Skip to content

Instantly share code, notes, and snippets.

@takikawa
Created August 13, 2012 19:35
Show Gist options
  • Save takikawa/3343507 to your computer and use it in GitHub Desktop.
Save takikawa/3343507 to your computer and use it in GitHub Desktop.
Tail recursion & delim. control
#lang racket
(define (tailtest)
(let ([p (make-continuation-prompt-tag)])
(call-with-continuation-prompt
(λ ()
(call-with-composable-continuation
(λ (k)
(abort-current-continuation p (λ () (tailtest))))
p))
p)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment