Skip to content

Instantly share code, notes, and snippets.

@sudodoki
Created April 17, 2017 11:32
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 sudodoki/d9a24078f6c0dc3e70dfe7fd2cafbf54 to your computer and use it in GitHub Desktop.
Save sudodoki/d9a24078f6c0dc3e70dfe7fd2cafbf54 to your computer and use it in GitHub Desktop.
const pair = (x, y) => f => f(x, y)
const head = (f) => f(x => x)
const tail = (f) => f((_, x) => x)
var a = pair(5, 10)
head(a)
tail(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment