axiom-math
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-math] What is the "+/" operator?


From: Bill Page
Subject: Re: [Axiom-math] What is the "+/" operator?
Date: Wed, 23 May 2007 13:43:20 -0400
User-agent: Webmail 4.0

Quoting Ralf Hemmecke <address@hidden>:

... 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]