
Hi. In this version
whereIsBM boiList = go 0 where go !_ Empty = Nothing go !acc (Cons idx lx) | (idx == Bacon) = Just acc | otherwise = go (acc + 1) lx
you abstract from boiList but then don't use it. You should either remove boiList on the left hand side or add it as a second argument to the call of the go function. In this version
whereIsBM boiList = case boiList of Nothing -> Nothing Just (Cons idx lx) | (idx == Bacon) -> Just 1 | otherwise -> (1 +) <$> (whereIsBM lx)
you are pattern matching on boiList with Nothing / Just, as if it is of Maybe type, but judging from the other functions and also the recursive call, you're expecting it to be of type MyList. Cheers, Andres