Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 2nd, 2013  |  syntax: C  |  size: 0.21 KB  |  hits: 1,685  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /* make closure. c is code. e is environment */
  2. static pointer mk_closure(scheme *sc, pointer c, pointer e) {
  3.         pointer x = get_cell(sc, c, e);
  4.  
  5.         typeflag(x) = T_CLOSURE;
  6.         car(x) = c;
  7.         cdr(x) = e;
  8.         return (x);
  9. }