Ackermann function: Difference between revisions
Content added Content deleted
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
|||
Line 8,903: | Line 8,903: | ||
return ackermann(%m-1,ackermann(%m,%n-1)); |
return ackermann(%m-1,ackermann(%m,%n-1)); |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
=={{header|Transd}}== |
|||
<syntaxhighlight lang="Scheme">#lang transd |
|||
MainModule: { |
|||
Ack: Lambda<Int Int Int>(λ m Int() n Int() |
|||
(if (not m) (ret (+ n 1))) |
|||
(if (not n) (ret (exec Ack (- m 1) 1))) |
|||
(ret (exec Ack (- m 1) (exec Ack m (- n 1)))) |
|||
), |
|||
_start: (λ (textout (exec Ack 3 1) "\n" |
|||
(exec Ack 3 2) "\n" |
|||
(exec Ack 3 3))) |
|||
}</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
13 |
|||
29 |
|||
61 |
|||
</pre> |
|||
=={{header|TSE SAL}}== |
=={{header|TSE SAL}}== |