more flexible partial application
jyasskin at google.com
Tue Jan 24 22:51:20 EST 2006
I think it's a neat feature, but:
Using _ seems to conflict with a Jhc extension in which "Using
underscore in an expression expands to bottom with an error message
giving the current file and line number."
Scheme has a similar feature called (cut) documented at
http://srfi.schemers.org/srfi-26/srfi-26.html. I haven't read the
SRFI, but it would make sense to incorporate their experience in any
new feature for Haskell.
On 1/24/06, Dinko Tenev <dinko.tenev at gmail.com> wrote:
> I created a feature request for this while GHC was still on SF, it has
> propagated to trac and can be seen here:
> On 1/23/06, Sebastian Sylvan <sebastian.sylvan at gmail.com> wrote:
> > Are there any subtle reasons for why something like the following
> > couldn't be allowed?
> > > foo x y z w = ...
> > > bar x w = foo x _ _ w
> > I.e. a more flexible version of partial application. This would be
> > translated too
> > > bar x w = \y z -> foo x y z w
> > I.e a function which takes the "_" parameters in the same order they
> > were encountered in the function application.
> > Some other languages allow this, such as Nemerle. Quite handy.
> > /S
> > --
> > Sebastian Sylvan
> > +46(0)736-818655
> > UIN: 44640862
> Haskell-prime mailing list
> Haskell-prime at haskell.org
More information about the Haskell-prime