Skip to content

Instantly share code, notes, and snippets.

@krisleech
Created July 24, 2020 17:14
Show Gist options
  • Save krisleech/9a36cb6150e4df29d9ee615cb4bd7058 to your computer and use it in GitHub Desktop.
Save krisleech/9a36cb6150e4df29d9ee615cb4bd7058 to your computer and use it in GitHub Desktop.
sketch
Add = ->(add, n) { n + add }
Times = ->(times, n) { n * times }
AddOne = Add.curry.call(1)
TimesFour = Times.curry.call(4)
AddOneTimesFour = AddOne >> TimesFour
AddOneTimesFour.(2) # => 12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment