[Haskell-cafe] Tupling functions

Richard O'Keefe ok at cs.otago.ac.nz
Wed Sep 14 03:35:33 CEST 2011

I would like to have

	tuple (f1,f2)       x = (f1 x, f2 x)
	tuple (f1,f2,f3)    x = (f1 x, f2 x, f3 x)
	tuple (f1,f2,f3,f4) x = (f1 x, f2 x, f3 x, f4 x)

I'm aware of Control.Arrow and the &&& combinator, and I can use that
instead, but f1 &&& f2 &&& f3 doesn't have _exactly_ the type I want.

What should I do?

More information about the Haskell-Cafe mailing list