"Bill Page" <[EMAIL PROTECTED]> writes:

[...]

| I don't think 'reduce(+,[])' requires too much magic  - at least in
| the interpreter. Try:
| 
| (1) -> myreduce(f,x)==(#x>1 => f(first x,myreduce(f,rest x)); #x=1 =>
| first x; f=_+ => 0; f=_* => 1;error "use: reduce(op,list,id)")
|                                             Type: Void
| (2) -> myreduce(+,[1,2,3])
|    Compiling function myreduce with type (Variable +,List
|       PositiveInteger) -> NonNegativeInteger
| 
|    (2)  6

[...]

| (5) -> myreduce(+,[])
|    Compiling function myreduce with type (Variable +,List None) ->
|       NonNegativeInteger
| 
|    (5)  0
|                                                Type: NonNegativeInteger

I'm very surprised you find that result OK.

-- Gaby

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to