Re: Higher-order function application

2000-08-24 Thread William Lee Irwin III
Bjorn Lisper <[EMAIL PROTECTED]> writes: }}>cos+sin-- intent: \x->((cos x)+(sin x)) }}>cos(sin) -- intent: \x->cos(sin(x)) }} have equivalents in Fortran 90 and HPF, although with arrays rather than }} functions. For instance, one can write "A+B" to mean an array with value

Re: Higher-order function application

2000-08-23 Thread Ralf Muschall
Bjorn Lisper <[EMAIL PROTECTED]> writes: > >cos+sin-- intent: \x->((cos x)+(sin x)) > >cos(sin) -- intent: \x->cos(sin(x)) > have equivalents in Fortran 90 and HPF, although with arrays rather than > functions. For instance, one can write "A+B" to mean an array with value

Re: Higher-order function application

2000-08-23 Thread George Russell
Tim Sweeney wrote: > However, a higher-order notion of function application seems sensible in > many cases. For example, consider the following expressions, which Haskell > rejects, despite an "obvious" programmer intent: Casting was done quite extensively by Algol68 (though not of this form). A

Re: Higher-order function application

2000-08-23 Thread Bjorn Lisper
Tim Sweeney: >Is this "higher order function application" a useful notion, and does any >research exist on the topic? The answer to the first question is "yes, when it matches the intuition of the programmer". Your two first examples: >cos+sin-

RE: Higher-order function application

2000-08-23 Thread Andrew Kennedy
. Springer Verlag LNCS 432, 1990. Unfortunately neither appear to be available online. - Andrew. > -Original Message- > From: Tim Sweeney [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 23, 2000 7:37 AM > To: [EMAIL PROTECTED] > Subject: Higher-order function appli

Re: Higher-order function application

2000-08-23 Thread D. Tweed
> Tim> 6. Applying a function f:t->u to a list x::[t] translates to > Tim> "map f x". This can be done in mathematica via function attribute (Listable if my memory is correct). IIRC It's defined by default only for functions that only make sense on pure numbers/symbols (eg Sin) and it's v

Re: Higher-order function application

2000-08-23 Thread Andreas Rossberg
"Ch. A. Herrmann" wrote: > > the problem is that we loose much of the strength the Haskell type > system provides and a lot of programming errors will remain > undetected. Moreover, it is completely incompatible with polymorphic typing and type inference, because you overload notation. Consider

Re: Higher-order function application

2000-08-23 Thread Adrian Hey
Hello, On Wed 23 Aug, Tim Sweeney wrote: > Is this "higher order function application" a useful notion, Eeek!, no IMHO > and does any research exist on the topic? I suspect not, though I must admit I'm no expert on what's being researched in the world. What sc

Re: Higher-order function application

2000-08-23 Thread Ch. A. Herrmann
Hi Tim, Tim> 6. Applying a function f:t->u to a list x::[t] translates to Tim> "map f x". the problem is that we loose much of the strength the Haskell type system provides and a lot of programming errors will remain undetected. What you can do is write a preprocessor that provides a ni

Higher-order function application

2000-08-22 Thread Tim Sweeney
\x->(cos(x)+sin(x))", we say: for all types t,u,v, for all functions f,g :: t->u, for all functions h ::u->u->v, h (f,g) = \x->h(f(x),g(x)). Is this "higher order function application" a useful notion, and does any research exist on the topic? -Tim