タグ

2013年3月8日のブックマーク (2件)

  • Delimited continuation - Wikipedia

    In programming languages, a delimited continuation, composable continuation or partial continuation, is a "slice" of a continuation frame that has been reified into a function. Unlike regular continuations, delimited continuations return a value, and thus may be reused and composed. Control delimiters, the basis of delimited continuations, were introduced by Matthias Felleisen in 1988[1] though ea

  • Scheme:call/ccと副作用

    c.l.sで興味深い議論が進行していたのでメモ。 purely functional Lisp + call/cc = ? 発端は、Nils M Holmの 「Purely functionalなマイLispにcall/ccをつけてみたよ」 という投稿。 それに対し、Schemeの大御所達から 「call/ccは、副作用を生じるよ」 と突っ込みが入る。 言い替えれば、「set!などの明示的な副作用オペレータを一切持たない purely functionalなLispに、call/ccを導入すると、それはもはや purely functionalではなくなる」ということ。 実例 これは簡単な例によって示すことができる。szgygによる例: (let ((f (lambda (x) (call/cc (lambda (k) k))))) (cons (f 0) (f 0))) (f 0)の2回

    Scheme:call/ccと副作用
    grafi
    grafi 2013/03/08