[Haskell-cafe] List comprehension

applebiz89 applebiz89 at hotmail.com
Tue May 5 11:20:35 EDT 2009


Hi, I think I need to use a list comprehension for this function but Im not
good with list comprehension. this is what I have so at the moment?

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)')

Is there an alternative solution instead of comprehension? I want the
function to be given a release date and then return all films with that
date.

Thanks
-- 
View this message in context: http://www.nabble.com/List-comprehension-tp23389686p23389686.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list