Perhaps it is possible to overload elt as follows:
elt: (%,1) -> A
elt: (%,2) -> B
I have seen such use of constants as domains elsewhere in FriCAS such as
elt: (%,"left") -> %
elt: (%,"right") -> %
in aggcat.spad.pamphlet.
Well, "left" is treated as a type and there is special code to
handle this case. 1 and 2 are not treated a types and there is
no support for them.
In Aldor, you'd see something like
apply: (%, 'left') -> A
where 'left' is the same as Enumeration(left:Type), i.e., a type.
I don't think that using elt instead of first/second is any advantage.
Ralf
--
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.