HP Forums
map and apply for programming - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: map and apply for programming (/thread-11581.html)



map and apply for programming - SpendTimeForPrime - 10-11-2018 01:00 PM

Is it possible to use map- and apply- commands for programming or they just work for CAS?
Thank you


RE: map and apply for programming - CyberAngel - 10-12-2018 08:43 PM

(10-11-2018 01:00 PM)SpendTimeForPrime Wrote:  Is it possible to use map- and apply- commands for programming or they just work for CAS?
Thank you

you can use // NOT TESTED
Code:

#cas
MapApply(VecM,VecA):=
BEGIN
  VecA:=apply(x->x^3,VecA);
  VecM:=map(VecM,x->x^3);
  RETURN VecM+VecA;
END;
#end
and use that cas program anywhere

check the details using [Help ] and User Guide