Ralf Hemmecke wrote:
> 
> >> 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.
> 

Actually, the parenthesis are just to avoid confusion.  And there
is disagreement between compiler and interpreter:


(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
(3) -> bar(x : Z -> Z) : Z == x(0)
   Function declaration bar : (Integer -> Integer) -> Integer has been 
      added to workspace.
                                                                   Type: Void
(4) -> baz : Integer -> Integer -> Integer
                                                                   Type: Void
(5) -> baz := foo
   Compiling function foo with type Integer -> (Integer -> Integer) 

   (5)  theMap(*1;foo;1;frame1)
                                      Type: (Integer -> (Integer -> Integer))
(6) -> baz := bar
   Compiling function bar with type (Integer -> Integer) -> Integer 
 
   Cannot convert from type ((Integer -> Integer) -> Integer) to (
      Integer -> (Integer -> Integer)) for value
   theMap(MAP)

Given that apparanty no type in algebra is written like 'Z -> Z -> Z'
it seems reasonable to change associativity of '->'.



-- 
                              Waldek Hebisch
[email protected] 

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

Reply via email to