> BTW1: I'll add an inplace operation too. Maybe even replacing this
> one?

Added the inplace code:

https://github.com/raoulb/fricas/commit/b15a2d3829a2045656ac9f4e4e26f6c23af66bb9

Note that due to a stupid error
the first code was inplace already.

Now it works as it should:

(1) -> l := [4,3,2,1]

   (1)  [4,3,2,1]
                                                  Type: List(PositiveInteger)
(2) -> countingBubbleSort(l)$SortPackage(INT, LIST INT)

   (2)  [sorted= [1,2,3,4],exchanges= 6]
            Type: Record(sorted: List(Integer),exchanges: NonNegativeInteger)
(3) -> l

   (3)  [4,3,2,1]
                                                  Type: List(PositiveInteger)
(4) -> countingBubbleSort!(l)$SortPackage(INT, LIST INT)

   (4)  [sorted= [1,2,3,4],exchanges= 6]
            Type: Record(sorted: List(Integer),exchanges: NonNegativeInteger)
(5) -> l                                                

   (5)  [1,2,3,4]
                                                  Type: List(PositiveInteger)

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

Reply via email to