Formated by GeSHi
;; Non-deterministic computation (define return-to-the-past (let/cc (toplevel) (letrec ((top (lambda (ign) (display "; NO MORE OPTIONS!") (newline) (toplevel top)))) top))) (define-syntax amb* (syntax-rules () ((amb* fail) (begin (fail #f))) ((amb* fail first alt ...) (let/cc (return) (let/cc (cont) (set! return-to-the-past cont) (return first)) (amb* fail alt ...))))) (define-syntax amb (syntax-rules () ((amb alt ...) (let ((fail-continuation return-to-the-past)) (amb* fail-continuation alt ...))))) (define (require cond) (if (not cond) (amb))) Parsed in 0.01874208 seconds
| :: Download | ||||
| :: Print into | ||||
:: Make Diff
:: Erase Post