Jump to content

Ackermann function: Difference between revisions

(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
Line 8,903:
return ackermann(%m-1,ackermann(%m,%n-1));
}</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}}==
111

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.