RosettaCodeData/Task/Catamorphism/Sidef/catamorphism.sidef

3 lines
64 B
Plaintext

say (1..10 -> reduce('+'));
say (1..10 -> reduce{|a,b| a + b});