Last active
August 29, 2015 14:20
-
-
Save bradparker/35d6c99fbf8a36869d6c to your computer and use it in GitHub Desktop.
Cons!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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