Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
7
Task/Ackermann-function/Wren/ackermann-function.wren
Normal file
7
Task/Ackermann-function/Wren/ackermann-function.wren
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// To use recursion definition and declaration must be on separate lines
|
||||
var Ackermann
|
||||
Ackermann = Fn.new {|m, n|
|
||||
if (m == 0) return n + 1
|
||||
if (n == 0) return Ackermann.call(m - 1, 1)
|
||||
return Ackermann.call(m - 1, Ackermann.call(m, n - 1))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue