Re: What is the "+/" operator?

"Bill Page" <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.general
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.