In Stack if bags.spad:
    Rep := Reference List S
    parts s == deref s

That's shared structure, not copy, thus

(11) -> x := stack [1,2,3,4]

   (11)  [1,2,3,4]
                                                 Type: 
Stack(PositiveInteger)
(12) -> y := parts x

   (12)  [1,2,3,4]
                                                  Type: 
List(PositiveInteger)
(13) -> y.1 := 5

   (13)  5
                                                        Type: 
PositiveInteger
(14) -> x

   (14)  [5,2,3,4]
                                                 Type: 
Stack(PositiveInteger)


I think this is wrong.  We should mention that parts do not share
structure with its argument in the doc (in aggcat.spad).

There's a "buggy?" comment in parts$Tree, but I think the
implementation is correct.

-- 
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