This is very ad-hoc example describes Not in scope: isOne error that I have:
ignoreFirstOnes :: [Int] -> [Int]
ignoreFirstOnes (1:xs) = dropWhile isOne xs
ignoreFirstOnes xs = xs
where isOne = (== 1)
Strange that isOne function was defined in where, however compiler keeps complaining. I can rewrite that using guards or even to dropWhile (== 1) but I would like to understand how to make work the current example.
casefor most functions: I often want to use awhereclause definition in multiple branches, and equational style doesn’t allow it.