Apply a callback to an array: Difference between revisions

m (→‎{{header|Picat}}: Added trans tag)
Line 2,407:
 
=={{header|Phixmonti}}==
<lang Phixmonti>/# Rosetta Code problem: http://rosettacode.org/wiki/Apply_a_callback_to_an_array
<lang Phixmonti>def map
by Galileo, 05/2022 #/
var op
len
for
var i
i get op exec i set
endfor
enddef
 
include ..\Utilitys.pmt
def add1
 
def add1++
1 +
enddef
Line 2,424 ⟶ 2,420:
enddef
 
( 1 2 3 ) dup
0 tolist
10 for
dup print 9 tochar print
0 put
endfor
nl
 
/# getid add1++ map #/swap
getid square map
 
nlpstack</lang>
10 for
{{out}}
get print 9 tochar print
<pre>
endfor
[[2, 3, 4], [1, 4, 9]]
nl</lang>
 
=== Press any key to exit ===</pre>
 
=={{header|PHP}}==
672

edits