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
15
Task/Ackermann-function/Lasso/ackermann-function.lasso
Normal file
15
Task/Ackermann-function/Lasso/ackermann-function.lasso
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/lasso9
|
||||
|
||||
define ackermann(m::integer, n::integer) => {
|
||||
if(#m == 0) => {
|
||||
return ++#n
|
||||
else(#n == 0)
|
||||
return ackermann(--#m, 1)
|
||||
else
|
||||
return ackermann(#m-1, ackermann(#m, --#n))
|
||||
}
|
||||
}
|
||||
|
||||
with x in generateSeries(1,3),
|
||||
y in generateSeries(0,8,2)
|
||||
do stdoutnl(#x+', '#y+': ' + ackermann(#x, #y))
|
||||
Loading…
Add table
Add a link
Reference in a new issue