Ralf Hemmecke wrote:
> 
> > So both 'map' and 'map!' for Queue should work accoring to order in
> > the queue.
> 
> Well, I think that map and map! should respect order, i.e.
> 
>   map(f, [a,b])
> 
> should be
> 
>   [f(a), f(b)]
> 
> and not
> 
>   [f(b), f(a)]
> 
> I would let it unspecified (in FriCAS) whether f(a) or f(b) is evaluated
> first. In that sense it should be "functional".

The point is that 'map' may make extra assumptions.  For example
OutputForm of polynomials is produced via 'map'.  For polynomials
you should be able to use associativity of multiplication, but
if you do you get different result.  Similarly, 'f' mapping over
queue of group elements may produce product of elements from
previous calls and current call -- if you change order of evaluation
you would break it.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to