Singleton list confusion

From HaskellWiki
Revision as of 15:47, 10 April 2008 by Lemming (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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 testing for same characters in lists of strings, Pattern match failure