Skip to content

Instantly share code, notes, and snippets.

@meetlai
Created August 23, 2012 14:59
Show Gist options
  • Save meetlai/3437488 to your computer and use it in GitHub Desktop.
Save meetlai/3437488 to your computer and use it in GitHub Desktop.
yin yang puzzle in scheme
(let ((yin ((lambda (foo) (newline) foo) (call/cc (lambda (bar) bar))))
(yang ((lambda (foo) (write-char #\*) foo) (call/cc (lambda (bar) bar)))))
(yin yang))
(define (id x) x)
(define (f x) (display "O") x)
(define (g x) (display "-") x)
((f (call/cc id)) (g (call/cc id)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment