Jump to content

Apply a callback to an array: Difference between revisions

→‎{{header|Delphi}}: Adds Déjà Vu example
(→‎{{header|Delphi}}: Adds Déjà Vu example)
Line 593:
end.
</lang>
=={{header|Déjà Vu}}==
There is a <code>map</code> builtin that does just this.
<lang dejavu>!. map @++ [ 1 4 8 ]
 
#implemented roughly like this:
#map f lst:
# ]
# for i in lst:
# f i
# [</lang>
{{output}}
<pre>[ 2 5 9 ]</pre>
 
=={{header|E}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.