public
Created

Kleyn: FP II

  • Download Gist
apply_math.rb
Ruby
1 2 3 4 5
def apply_math(fn, a, b)
a.send(fn, b)
end
 
apply_math(:+, 1, 2) # => 3

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.