RosettaCodeData/Task/Currying/Wren/currying.wren

5 lines
130 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
var addN = Fn.new { |n| Fn.new { |x| n + x } }
var adder = addN.call(40)
System.print("The answer to life is %(adder.call(2)).")