RosettaCodeData/Task/Higher-order-functions/Smalltalk/higher-order-functions-2.st

3 lines
64 B
Smalltalk

function := [:x | x * 3 - 1].
#(1 1 2 3 5 8) collect: function.