> > BTW: Do we have a cumulative sum function in Fricas? > > The cumSum([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) should > > give me [0, 1, 3, 6, 10, 15, 21, 28, 36, 45]. > > Do you mean this one-liner? > > cumSum(l: List Integer): List Integer == (s:=0;[(s:=s+i) for i in l])
Yes, thanks. Ok, we can do it in this one line. However I think it is not so user friendly to type this line every time one needs that function. When we stay on this level, we would use a for loop for each "map" and "reduce". Just my opinion ... -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
