Last active
December 8, 2017 20:28
-
-
Save Capital-EX/049f6923d1f7dce86164f80cb12bac5e to your computer and use it in GitHub Desktop.
Program written in Lua made to emulate Unlamdba's S K I operators.
This file contains 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
s = | |
(function(x) | |
return function(y) | |
return function(z) | |
return x(z)(y(z)) | |
end | |
end | |
end) | |
k = | |
(function(x) | |
return function(y) | |
return x | |
end | |
end) | |
i = | |
(function(x) | |
return x | |
end) | |
p = --Do to the way . in unlambda works, I had to curry the print value. | |
(function(x) | |
return function(y) | |
io.write(x) | |
return y | |
end | |
end) | |
r = p"\n" | |
--Warning: This programming will run forever unless terminated. | |
s(s(s(i)(i))(k(i)))(k(p"*"))(s(s(k(s))(s(k(s(k(s))))(s(s(k(s))(s(k(s(k(r))))(s(k(s(i)))(k))))(k))))(k(s(k(s))(k)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment