The algebra is full of examples where things work by a sheer amount of
luck. Consider the function rightPower in functor MonadWithUnit:
rightPower(a: %,n: NonNegativeInteger) ==
zero? n => 1
res := 1
for i in 1..n repeat res := res * a
res
What should be the type of constant 1 selected at the assignment
res := 1
and why?
There are three candidates in in scope:
1: %
1: NonNegativeInteger
1: Integer
Currently, all this works mostly by luck.
The fix is to write
res: % := 1
or
res := 1@%
or
res := 1$%
-- Gaby
--
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.