Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Testing latest pari + WASM + node.js... and it works?! Wow.

28495 views
License: GPL3
ubuntu2004
apply(x->x^2, [1,2,3,4])
apply(x->x^2, [1,2;3,4])
apply(x->x^2, 4*x^2 + 3*x+ 2)
apply(x->x^2, 4*x^2 + 3*x+ 2 + O(x^3))
apply(x->x^2, List([1,2,3,4]))
L = List([Mod(1,3), Mod(2,4)]); apply(lift, L)
f(x)=L=0;x-1;
L=List(); apply(f, L);
L=[1,2,3]; apply(f, L)
L=[1,2,3]; [f(x) | x<-L]
L=[1,2,3]; [x | x<-L, f(x)]
L=[1,2,3]; select(f, L)
[x|x<-Map([1,2;3,4])]

fold((x,y)->x*y, [1,2,3,4])
fold((x,y)->[x,y], [1,2,3,4])
fold((x,f)->f(x), [2,sqr,sqr,sqr])
fold((x,y)->(x+y)/(1-x*y),[1..5])

printfnl(format,args[..]) = call(printf,[format,args]);print();
printfnl("%s: %s, %s",1,2,3)
call("_*_",[3,5])
\\errors
call(strprintf, ["%d", 10])