[project @ 2001-03-23 17:41:32 by simonmar]
[ghc-hetmet.git] / ghc / tests / deSugar / should_compile / ds004.hs
1 -- !!! ds004 -- nodups from SLPJ p 79
2 --
3 module ShouldCompile where
4
5 -- SLPJ, p 79
6 nodups []                   = []
7 nodups [x]                  = [x]
8 nodups (y:x:xs) | y == x    = nodups (x:xs)
9                 | True      = y : nodups (x:xs)