Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
8
Task/Catamorphism/Maple/catamorphism-1.maple
Normal file
8
Task/Catamorphism/Maple/catamorphism-1.maple
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
> nums := seq( 1 .. 10 );
|
||||
nums := 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
|
||||
|
||||
> foldl( `+`, 0, nums ); # compute sum using foldl
|
||||
55
|
||||
|
||||
> foldr( `*`, 1, nums ); # compute product using foldr
|
||||
3628800
|
||||
2
Task/Catamorphism/Maple/catamorphism-2.maple
Normal file
2
Task/Catamorphism/Maple/catamorphism-2.maple
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
> foldl( (a,b) ->a*T+b, op(map2(op,1,[op( 72*T^5+37*T^4-23*T^3+87*T^2+44*T+29 )])));
|
||||
((((72 T + 37) T - 23) T + 87) T + 44) T + 29
|
||||
Loading…
Add table
Add a link
Reference in a new issue