zipWith, zipWith3, zipWith4.... looks gawky, IMHO
Dylan Thurston
dpt@math.harvard.edu
Mon, 19 Aug 2002 15:10:40 -0400
--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sun, Aug 18, 2002 at 06:32:27PM +0200, Coeus@gmx.de wrote:
> Hi all.
> I'm new to this mailing list. (and still a relative newbie in Haskell -
> learning GraphicsLib)
> Because the Wish List did not work (maybe it is my browsers fault), I now
> write it to this list.
>=20
> I found the zipWithN functions in the standard libs, but imho it would be
> much more comfortable to use operators like in this example:
>=20
> ...
> infixl 123whatever (:<), (><)
> -- lower priority than (++)
>=20
> (:<) :: (a->b) -> [a] -> [b]
> (:<) =3D map
>=20
> (><) :: [(a->b)] -> [a] -> [b]
> (><) =3D zipWith id
Nice, except that operator names that start with ':' are constructors.
Have you seen the paper "Do we need dependent types"
<http://www.brics.dk/RS/01/10/>? They do the same trick, and go
further.
--Dylan
--ZPt4rx8FFjLCG7dd
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9YUKwVeybfhaa3tcRArrZAJwKNH7cHT5M4C661AMWEJ4KTlmLzgCfWlz8
pyj5bzzBAjB7pyJ+nL4fhsg=
=ousK
-----END PGP SIGNATURE-----
--ZPt4rx8FFjLCG7dd--