Skip to content

Instantly share code, notes, and snippets.

@Shinpeim
Created October 26, 2014 13:01
Show Gist options
  • Save Shinpeim/9700d5ce53ba24d87497 to your computer and use it in GitHub Desktop.
Save Shinpeim/9700d5ce53ba24d87497 to your computer and use it in GitHub Desktop.
nyan = ->(a, b){a + b}
curried_nyan = nyan.curry
fun_list = [1, 2, 3, 4, 5, 6].map(&curried_nyan) # => [->(b){1 + b} , ->(b){2 + b}...]
p fun_list.first.(1) #=> 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment