RosettaCodeData/Task/Apply-a-callback-to-an-array/Tailspin/apply-a-callback-to-an-array-2.tailspin
2024-10-16 18:07:41 -07:00

14 lines
263 B
Text

numbers is [1,3,7,10];
cube templates
$ * $ * $ !
end cube
-- Using lens transforms
$numbers(.. as i; -> $ * $i) !
$numbers(..; -> $ * $) !
$numbers(..; -> cube) !
-- Using array literal and deconstructor
[ $numbers... -> $ * $ ] !
[ $numbers... -> cube ] !