[Haskell-beginners] Parse error in pattern

Brent Yorgey byorgey at seas.upenn.edu
Sat Jan 7 17:49:51 CET 2012


On Sun, Jan 08, 2012 at 12:11:29AM +0800, Zhi-Qiang Lei wrote:
> 
> scan :: [Point a] -> [Point a]
> scan p1 : p2 : p3 : xs

Patterns with constructors and multiple components must be surrounded
by parentheses.  So this should be

  scan (p1 : p2 : p3 : xs)

-Brent



More information about the Beginners mailing list