Francois Maltey,

As I explained in my original email, it is not currently possible to
compile this code in any version of Axiom. In that email thread Gaby
has stated that he considers this a bug in the SPAD compiler.

I do not understand your code. It is not necessary or desirable to
write '(f has _+:(S,S)->S)' in

        if (S has AbelianMonoid) and (f has _+:(S,S)->S)

since AbelianMoniod already has the definition of + and of 0. Also I
do not understand:

        (f=(_+:(S,S)->S)) => error "first x"   -- Can I compare the
function f to _+ ?

The logic seems incorrect. Why issue an error message?. But *if* it
was possible to compile, then the correct syntax for this would be:

      (f= (_+$S) => ...

where '_+$S' refers specifically to the + operation in the package/domain S.

Regards,
Bill Page.

On Mon, Apr 7, 2008 at 10:09 AM, you wrote:
>
>  Hello,
>
>  I look in aggcat.spad.pamphlet the definition of reduce around line 2231
>  in Category ListAggregate.
>
>  So I take the code of Bill about reduce and I begin to change the
>  definition with :
>
>    if (S has AbelianMonoid) and (f has _+:(S,S)->S) then -- and S has zero()
>        reduce(f, x)            ==
>          (f=(_+:(S,S)->S)) => error "first x"   -- Can I compare the  
> function f to _+ ?
>          empty? x =>
>            error "reducing over an empty list needs the 3 argument form"
>          reduce(f, rest x, first x)
>      else
>        reduce(f, x)            ==
>          empty? x =>
>              error "reducing over an empty list needs the 3 argument form"
>          reduce(f, rest x, first x)
>
>  But how can I compare the function f to the function _+ in S.
>  I try a lot of syntaxs but I don't find...
>  Is it possible ?
>
>  Are openAxiom and fricas different ?
>

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to