>> cumSum(l: List Integer): List Integer == (s:=0;[(s:=s+i) for i in >> l])
> I think it is not so user friendly to type this line every time one > needs that function. Well, the question is always, how often that function will be used later, i.e. how many users would find that useful. Could you also explain why you see this function as usefull? https://github.com/raoulb/fricas_code/blob/master/mama/MAMA.spad#L33 element(A, r, c) == matrix([[A(r,c)]]) It just puts the result of A(r,c) into a 1x1 matrix. What's the gain? arow(A:M, r:PI) : M == -- Really not happy with this: transpose(row(A pretend Matrix(R), r)::Matrix(R)) pretend M I also don't get, why you are unhappy with that? You can probably write transpose(row(A), r)::Matrix(R)) pretend M Now, it becomes clearer, why this is dangerous. 1) in Matrix R there is a coerce from Vector R to Matrix R. But since A:M, we have row(A): Row. Where do you see that Row and Vector(R) are compatible? In fact the compiler should not let you compile this code. Furthermore, the final "pretend M" is dangerous as well. It is by no means clear that Matrix R and M would have the same representation. Ralf -- 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.
