Personal tools

Singleton list confusion

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(short introduction)
(further example, but same author)

Revision as of 15:46, 10 April 2008

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

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

Maybe it is some kind of list comprehension.

See for example Haskell-Cafe about

testing for same characters in lists of strings,
Pattern match failure