Quoting Ralf Hemmecke <[EMAIL PROTECTED]>:
...
But if you like the
f/[a,b,c]
syntax, you can actually define a similar things in Aldor. (I guess,
SPAD would be just the same.)
That's cool, Ralf.
Take a look at this in the Axiom interpreter:
(1) -> Z ==> Integer
Type: Void
(2) -> /: ((Z, Z) -> Z, List Z) -> Z
Type: Void
(3) -> _/(f: (Z, Z) -> Z,l: List Z): Z == ( empty? l => 0; f(first l, f/(rest
l)))
Function declaration ?/? : (((Integer,Integer) -> Integer),List
Integer) -> Integer has been added to workspace.
Type: Void
(4) -> (+)/[1,2,3]
Compiling function / with type (((Integer,Integer) -> Integer),List
Integer) -> Integer
(4) 6
Type: PositiveInteger
--------
Regards,
Bill Page.
_______________________________________________
Axiom-math mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-math