recentpopularlog in

ianweatherhogg : callcc   12

articles/ at master · quchen/articles
-- |-------------| <- "Continuation" type. ("square maps an
-- | | 'a' to a continuation")
square :: Int -> (Int -> r) -> r
square x = \k -> k (x^2)
haskell  continuation  callcc  derivation  functor  applicative  5* 
november 2013 by ianweatherhogg
SIGUSR2 > Python Worlds
Last year, I was introduced to a paper via Lambda the Ultimate about worlds, a language construct which allows one to control the scope of side effects while programming. Worlds allow you to capture the current scope of a program in a first-class way. All
python  scheme  callcc  context  4*  functional  programming  side  continuation  animation 
april 2011 by ianweatherhogg
RiK0 Tech Temple: call/cc! I yield! Bah, lazy-seq.
import collections

Node = collections.namedtuple('Node', 'value left right')

def make_node(value, left=None, right=None):
    return Node(value, left, right)

def preorder(tree):
    stack = [tree]
    while stack:
        current = stack.pop()
clojure  scheme  python  callcc  3*  visitor  design  pattern  continuation  generator 
march 2011 by ianweatherhogg

Copy this bookmark:

to read