[Haskell-cafe] List comprehension
Bulat Ziganshin
bulat.ziganshin at gmail.com
Tue May 5 11:32:12 EDT 2009
Hello applebiz89,
Tuesday, May 5, 2009, 7:20:35 PM, you wrote:
> filmsInGivenYear :: Int -> [Film] -> [String]
> filmsInGivenYear filmYear ?= [ title | year <- (Film title director year
> fans) , year == filmYear] (this code wont compile - error given '?Syntax
> error in expression (unexpected `;', possibly due to bad layout)')
you forget films list variable:
filmsInGivenYear filmYear films =
[ title | (Film title director year fans) <- films, year == filmYear]
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list