listOfTerms vs terms

4 views
Skip to first unread message

Ralf Hemmecke

unread,
Dec 7, 2025, 8:00:33 PM (3 days ago) Dec 7
to fricas-devel
I wonder why we need a copy of the data structure for "terms" but not
for "listOfTerms". The specification unfortunately says nothing about
what the expected behaviour shoulld be. A copy is certainly safer, but
do we really need/want it?

Anyway, the docstring for "terms" claims "This is the internal
representation.". But it actually is a copy of it.

I also do not see why the implementation of "listOfTerms" appears under
the "if M has Comparable then ..." condition. Is it just because its
doctrics says something about "construct(listOfTerms x)=x" and
"construct" involves "smaller?" ?

Ralf

https://github.com/fricas/fricas/blob/master/src/algebra/mring.spad#L125


https://github.com/fricas/fricas/blob/master/src/algebra/mring.spad#L205
Reply all
Reply to author
Forward
0 new messages