code_junkie

Continuation passing style vs aggressively trimmed call stack

Nov 14th, 2011
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. def add (x,y) => x + y
  2.  
  3. print( add(7, 5) )
  4.  
  5. [&add, x, y, &print, _, &repl, ...]
  6.  
  7. [&print, 12, &repl, ...]
  8.  
  9. [repl, ...]
  10.  
  11. for (;;)
  12. args = (args[0].function_pointer)(args);
Add Comment
Please, Sign In to add comment