Skip to content

Instantly share code, notes, and snippets.

@dLobatog
Created June 24, 2013 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dLobatog/5853699 to your computer and use it in GitHub Desktop.
Save dLobatog/5853699 to your computer and use it in GitHub Desktop.
curried_sum = sum.curry
sum_of_squares = curried_sum.(lambda { |x| x**2 } )
sum_of_squares.(1,5) #=> 55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment