Skip to content

Instantly share code, notes, and snippets.

@fogus
Created January 19, 2012 16:52
Show Gist options
  • Select an option

  • Save fogus/1641139 to your computer and use it in GitHub Desktop.

Select an option

Save fogus/1641139 to your computer and use it in GitHub Desktop.
: throw drop ;
: tuck swap over ;
: car! ( v a - ) ! ;
: cdr! ( v a - ) cell+ ! ;
: car@ ( a - v ) @ ;
: cdr@ ( a - v ) cell+ @ ;
: cons ( k v - a ) swap 2 cells allocate throw tuck ! tuck ! ;
: cons0 ( - a ) 0 0 cons ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment