On Fri, 26 Sep 2003, Derek Elkins wrote:
> On Thu, 25 Sep 2003 12:59:37 -0700
> Mark Tullsen <[EMAIL PROTECTED]> wrote:
>
> > Haskell has lazy/lifted products and not true products.
>
> Aren't lazy products true products? What makes something a product is:
> fst (x,y) = x
> snd (x,y) = y
> for al
On Thu, 25 Sep 2003 12:59:37 -0700
Mark Tullsen <[EMAIL PROTECTED]> wrote:
> Haskell has lazy/lifted products and not true products.
Aren't lazy products true products? What makes something a product is:
fst (x,y) = x
snd (x,y) = y
for all x and y. This holds with lazy products but not eager
Haskell has lazy/lifted products and not true products. This "feature"
is considered by many to be an unfortunate aspect of Haskell. A 2-tuple
is just syntactic sugar for
data Tuple2 a b = Tuple2 a b
Maybe from seeing this, it's clearer why laws such as
x = (fst x,snd x)
do not hold. Neither
hello,
Richard Nathan Linger wrote:
On Wed, 24 Sep 2003, Norman Ramsey wrote:
Consider the following Haskell function:
asPair x = (fst x, snd x)
This function has type forall a b. (a, b) -> (a, b)
and is almost equivalent to the identity function, except it
can be used to make programs termina
On Wed, 24 Sep 2003, Norman Ramsey wrote:
> Consider the following Haskell function:
>
> > asPair x = (fst x, snd x)
>
> This function has type forall a b. (a, b) -> (a, b)
> and is almost equivalent to the identity function, except it
> can be used to make programs terminate that might otherw
Consider the following Haskell function:
> asPair x = (fst x, snd x)
This function has type forall a b. (a, b) -> (a, b)
and is almost equivalent to the identity function, except it
can be used to make programs terminate that might otherwise fall
into a black hole.
My students are extremely myst