[Haskell-cafe] Partial Tuple application (Was: Comma in the front)
Henning Thielemann
lemming at henning-thielemann.de
Fri Jul 14 05:27:57 EDT 2006
On Fri, 14 Jul 2006, Bulat Ziganshin wrote:
> Hello Tomasz,
>=20
> Friday, July 14, 2006, 9:31:32 AM, you wrote:
>=20
> >> There might be issues with tuples though, for example (1,2,) would be
> >> the (,) tuple and not the (,,) tuple, which is a bit weird.
>=20
> > Besides, it might be a bit more natural if (1,2,) was a shorthand for
> (\x ->> (1,2,x))
>=20
> in haskell-prime list there was a proposal to use '?' for such things:
>=20
> (1,2,?)
>=20
> only problem is what it's hard to define exactly where the lambda
> should arise:
>=20
> (1,2,\x->x)
> (\x -> (1,2,x))
Yes that's a really evil problem that I already encountered in
mathematics. Some mathematicians like to write f(=B7) or even f(=B7-k) whic=
h
exhibits exactly the ambiguity you mention. Such placeholders are a really
bad idea.
More information about the Haskell-Cafe
mailing list