On Wed, Jul 11, 2018 at 4:14 PM, Raymond Rogers <[email protected]> wrote: > On 07/11/2018 03:15 PM, Bill Page wrote: > ... > If I replace 'first' with a different name e.g. 'first2' and 'last' > with 'last2' then there are no such errors. So far as I know > 'first' and 'last' are not reserved words in spad. >
It seems like 'first' and 'last' are imported as literals from the List domain where they are used in 'elt' to provide the notation 'x.first' and 'x.last'. These are exactly equivalent to the functions 'first x' and 'last x' also exported by List. > In other contexts "first" and "last" are list operators, getting > the first and last item; or in some cases a pointer. They work > as operators in fricas. Yes of course. These are operators that are exported by the List domain constructor. The List domain constructor also exports another other called 'elt' which can also be denoted by just a '.'. 'x.last' is exactly equivalent to 'elt(x,last)'. > I would avoid trying to use them as literals FriCAS already uses them as literals. In my code I did not use them as literals but I did define new functions with the same name. This triggered the error message because I also use variables of type 'List'. > and think they should be reserved and defined. I disagree. > Personally I wouldn't trust "overloading" them either. Why? FriCAS does this extensively. > Basically I think that they come down (up?) from Lisp. > No, that is not the case. -- 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.
