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 ?
Francois
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel