Created
August 10, 2019 23:46
-
-
Save sasagawa888/b856302cb73eb422f29bddb85c59050f to your computer and use it in GitHub Desktop.
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
Elxlog ver0.05 | |
?- X is elx_tarai(12,6,0). | |
X = 12 | |
true | |
?- | |
def tarai(x, y, z) do | |
cond do | |
x <= y -> y | |
true -> tarai(tarai(x - 1, y, z), tarai(y - 1, z, x), tarai(z - 1, x, y)) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment