Here's my code:
main = do
contents <- getContents
let threes = groupsOf 3 (map read $ lines contents)
where groupsOf 0 _ = []
groupsOf _ [] = []
groupsOf n xs = take n xs : groupsOf n (drop n xs)
putStrLn $ show threes
When I run this while piping a text file into the input I get:
test.hs:4:13: parse error on input `groupsOf'
Not sure what I'm doing wrong here. From what I can tell my syntax is correct...