RosettaCodeData/Task/Higher-order-functions/Lingo/higher-order-functions-2.lingo
2016-12-05 23:44:36 +01:00

7 lines
169 B
Text

l = [1, 2, 3]
-- passes the built-in function 'sin' (which is a method of the _movie object) as argument to map
res = map(l, #sin)
put res
-- [0.8415, 0.9093, 0.1411]