Skip to content

Instantly share code, notes, and snippets.

@ympbyc
Created November 10, 2011 16:13
Show Gist options
  • Save ympbyc/1355247 to your computer and use it in GitHub Desktop.
Save ympbyc/1355247 to your computer and use it in GitHub Desktop.
Zコンビネータで酒が飲めるぞー!酒が飲める飲めるぞー!酒が飲めるぞー!
;汚い。気にしない。
(define Z (lambda (f) ((lambda (p)
(f (lambda (a) ((p p) a))))
(lambda (p)
(f (lambda (a) ((p p) a)))))))
(define sake (lambda (f)
(lambda (n)
(if (> n 12)
'()
(cons #`",|n|月はZコンビネータで酒が飲めるぞー!酒が飲める飲めるぞー!酒が飲めるぞー!♪" (f (+ n 1)))))))
((Z sake) 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment