RosettaCodeData/Task/Apply-a-callback-to-an-array/Salmon/apply-a-callback-to-an-array-2.salmon
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

9 lines
153 B
Text

include "short.salm";
fun apply(list, ageless to_apply)
(comp(x; list) (to_apply(x)));
fun square(x) (x*x);
iter(x; apply([0...9], square))
x!;