Skip to content

Instantly share code, notes, and snippets.

@eadz
Created May 21, 2020 22:53
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 eadz/a9ee38998b1ef829deafd5b30d38e406 to your computer and use it in GitHub Desktop.
Save eadz/a9ee38998b1ef829deafd5b30d38e406 to your computer and use it in GitHub Desktop.
to_proc.curry
changer = "Hello X World".method(:tr).to_proc.curry.call("X")
changer.call("Z") # => Hello Z World
changer.call("Y") # => Hello Y World
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment