mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
added grace support
This commit is contained in:
6
samples/Grace/ackerman_function.grace
Normal file
6
samples/Grace/ackerman_function.grace
Normal file
@@ -0,0 +1,6 @@
|
||||
method ack (m : Number, n : Number) -> Number {
|
||||
print "ack {m} {n}"
|
||||
if (m < = 0) then {n + 1}
|
||||
elseif {n <= 0} then {ack((m -1), 1)}
|
||||
else {ack(m -1, ack(m, n-1))}
|
||||
}
|
||||
Reference in New Issue
Block a user