Personal tools

Singleton list confusion

From HaskellWiki

Revision as of 15:44, 10 April 2008 by Lemming (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Why do Haskell newcomers frequently believe, that list variables must be enclosed in brackets?

People sometimes write argument patterns like
[x]
, hoping that
x
will assume all values of a list successively.

Maybe it is some kind of list comprehension.

See for example Haskell-Cafe about Pattern match failure