Skip to content

Instantly share code, notes, and snippets.

@bradparker
Last active August 29, 2015 14:20
Show Gist options
  • Save bradparker/35d6c99fbf8a36869d6c to your computer and use it in GitHub Desktop.
Save bradparker/35d6c99fbf8a36869d6c to your computer and use it in GitHub Desktop.
Cons!
const cons = (a, b) =>
(member) => {
if (member === 1) {
return a
} else if (member === 2) {
return b
}
}
const car = (pair) =>
pair(1)
const cdr = (pair) =>
pair(2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment