f: (Integer, Integer) -> Float -> Float
The above is equivalent to:
f: ((Integer, Integer) -> Float) -> Float
:-(
I've looked through the Axiom book and couldn't find a clear sign
whether -> is supposed to be left or right associative (by specification).
Tim, do you now something about this part of the history?
The closest I could find was on page 278 where there is something like
(1) -> Z==>Integer
Type: Void
(2) -> foo(x:Z): Z -> Z == (y: Z): Z +-> 1000*x+y
Function declaration foo : Integer -> (Integer -> Integer) has been
added to workspace.
Type: Void
where the parentheses in he output suggest right associativity.
I'm somehow Aldor biased and would like the specification that
A->B->C means A->(B->C)
more.
Ralf
----
%1 >> #include "axllib"
Comp: 80 msec, Interp: 0 msec
%2 >> Z==>Integer
Comp: 0 msec, Interp: 0 msec
%3 >> import from Integer
Comp: 10 msec, Interp: 0 msec
%4 >> foo(x: Z)(y: Z): Z == 1000*x+y
Defined foo @ (x: Integer) -> (y: Integer) -> Integer
Comp: 0 msec, Interp: 10 msec
%5 >> foo(3)(4)
3004 @ Integer
Comp: 0 msec, Interp: 10 msec
%6 >> bar: Z->Z->Z == (x:Z):Z->Z +-> (y:Z):Z +-> 1000*x+y
Defined bar @ Integer -> Integer -> Integer
Comp: 0 msec, Interp: 0 msec
%7 >> baz := bar 1
() @ Integer -> Integer
Comp: 0 msec, Interp: 0 msec
%8 >> baz 7
1007 @ Integer
Comp: 0 msec, Interp: 0 msec
%9 >> ans(x:Z): Z -> Z == (y: Z): Z +-> 1000*x+y
Defined ans @ (x: Integer) -> Integer -> Integer
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.