A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
13
Task/Anonymous-recursion/Maple/anonymous-recursion-1.maple
Normal file
13
Task/Anonymous-recursion/Maple/anonymous-recursion-1.maple
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Fib := proc( n :: nonnegint )
|
||||
proc( k )
|
||||
option remember; # automatically memoise
|
||||
if k = 0 then
|
||||
0
|
||||
elif k = 1 then
|
||||
1
|
||||
else
|
||||
# Recurse, anonymously
|
||||
thisproc( k - 1 ) + thisproc( k - 2 )
|
||||
end
|
||||
end( n )
|
||||
end proc:
|
||||
Loading…
Add table
Add a link
Reference in a new issue