[Haskell-cafe] Re: Wikipedia on first-class object
Achim Schneider
barsoap at web.de
Mon Dec 31 04:14:39 EST 2007
"Cristian Baboi" <cristi at ot.onrc.ro> wrote:
> On Mon, 31 Dec 2007 10:59:28 +0200, Achim Schneider <barsoap at web.de>
> wrote:
>
> > Achim Schneider <barsoap at web.de> wrote:
> >
> >> "Cristian Baboi" <cristi at ot.onrc.ro> wrote:
> >>
> >> > What is infinite in let x = x in x ?
> >> ^ | |
> >> |___/ |
> >> \________/
> >>
> > a = let x = x in x
> > is actually only quite verbose for
> > a = undefined,
> >
> > the only difference being that undefined is a nicer _|_ than let x
> > = x in x.
> >
>
> I could have written this instead:
>
> a :: Something
> a = a
>
> Which is nicer than undefined.
>
ksf at solaris ~ % ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> let a = undefined
Prelude> a
*** Exception: Prelude.undefined
Prelude> let a = a
Prelude> a
Interrupted.
nope, it isn't.
And then
let a = a
is more defined than the other two... only the equation is _|_, not the
value that is "assigned". Value that is equated? Term? Jonathan, please
beat me.
--
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited.
More information about the Haskell-Cafe
mailing list