On Mon, Mar 9, 2009 at 10:37 AM, Eugene Kirpichov <ekirpichov@gmail.com> wrote:
I mean, there is no way to write a firstCoord function so that it
would work, for example, on '\y -> P 42 y' and yield 42.
Except for this one:
firstCoord proj = case (proj undefined) of P x y -> x
However, this requires proj to be non-strict in its remaining argument.
But this will actually work if you pass "P x" to it for some x,
because it *is* non-strict in the remaining argument.