Ackermann function: Difference between revisions

no edit summary
(→‎{{header|Risc-V}}: update Risc-V -> RISC-V Assembly)
No edit summary
Line 3,178:
(t (ackermann (1- m)
(ackermann m (1- n))))))</syntaxhighlight>
 
=={{header|EMal}}==
<syntaxhighlight lang="emal">
fun ackermann = int by int m, int n
return when(m == 0,
n + 1,
when(n == 0,
ackermann(m - 1, 1),
ackermann(m - 1, ackermann(m, n - 1))))
end
for int m = 0; m <= 3; ++m
for int n = 0; n <= 6; ++n
writeLine("Ackermann(" + m + ", " + n + ") = " + ackermann(m, n))
end
end
</syntaxhighlight>
 
=={{header|Erlang}}==
214

edits