Skip to content

Instantly share code, notes, and snippets.

@certainty
Created September 18, 2015 07:47
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 certainty/f0e33699d5160c87a968 to your computer and use it in GitHub Desktop.
Save certainty/f0e33699d5160c87a968 to your computer and use it in GitHub Desktop.
def cons(a,b)
->(accessor) { accessor.(a,b) }
end
def car(cell)
cell.(->(a,_) { a })
end
def cdr(cell)
cell.(->(_,b) { b })
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment