public
Created

Kleyn: FP II

  • Download Gist
adder.rb
Ruby
1 2 3 4 5 6
def adder(a, b)
lambda { a + b }
end
 
adder_fn = adder(1, 2)
adder_fn.call # => 3

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.