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

Erik de Castro Lopo hc-erikd at mega-nerd.com
Sat Dec 31 18:38:22 EST 2005

Erik de Castro Lopo wrote:

> Hi all,
> I'm working through the "Haskell for C programmers" tutorial
> and in this section":

Now :


has the following:

    showLen :: [a] -> String
    showLen lst = (show (theLen)) ++ (if theLen == 1 then " item" else " items")
        theLen = len lst

Shouldn't "len" in the last line be "length"?

  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

More information about the Haskell-Cafe mailing list