Created
February 25, 2009 02:55
-
-
Save pete/69964 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; The SKI library from Roboto. With minor tweaks, it should run in most | |
| ; flavors of Scheme, I suspect. Some definitions (the hard ones!) taken from | |
| ; the Unlambda page (http://www.madore.org/~david/programs/unlambda/). | |
| (= pkgname 'SKI) | |
| ; Prelude: | |
| (= λ lambda) ; A more classical feel. | |
| ; The two primitives: | |
| (def S x (λ y (λ z ((x z) (y z))))) | |
| (def K x (λ y x)) | |
| ; There are zero lambdas below this line: | |
| (= V (((S ((S (K S)) K)) K)((S ((S (K S)) K)) K))) | |
| (= I ((S K) K)) | |
| (= Y (((S (K ((S I) I))) (S ((S (K S)) K))) (K ((S I) I)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment