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

3 lines
64 B
Smalltalk
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
function := [:x | x * 3 - 1].
#(1 1 2 3 5 8) collect: function.