[Haskell-cafe] Bug in "Haskell for C programmers" tutorial?

Cale Gibbard cgibbard at gmail.com
Sat Dec 31 18:57:28 EST 2005


Yes, it's a bug in the tutorial, on both accounts. Hopefully Eric is
reading this list :)

 - Cale

On 31/12/05, Erik de Castro Lopo <hc-erikd at mega-nerd.com> wrote:
> Erik de Castro Lopo wrote:
>
> > Hi all,
> >
> > I'm working through the "Haskell for C programmers" tutorial
> > and in this section":
>
> Now :
>
>     http://www.haskell.org/~pairwise/intro/section3.html#part3
>
> has the following:
>
>     showLen :: [a] -> String
>     showLen lst = (show (theLen)) ++ (if theLen == 1 then " item" else " items")
>         where
>         theLen = len lst
>
> Shouldn't "len" in the last line be "length"?
>
> Erik
> --
> +-----------------------------------------------------------+
>   Erik de Castro Lopo
> +-----------------------------------------------------------+
> "Indeed, I am impressed that Google runs an 8,000 node Linux
> cluster, 5 data centers, an extensive network, and a rapidly
> evolving application all with a staff of 12."
>   -- http://research.microsoft.com/~gray/papers/FAAMs_HPTS.doc
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list