argument of (|>) is causing a type mismatch. 5| findC 2 |> findS ^^^^^ (|>) is expecting the right argument to be a: Maybe Char -> a But the right argument is: Char -> Maybe String Hint: I always figure out the type of the left argument first and if it is acceptable on its own, I assume it is "correct" in subsequent checks. So the problem may actually be in how the left and right arguments interact.
Maybe b andThen x f = case x of Nothing -> Nothing Just a -> f a find n = findC n `andThen` findS `andThen` findM > find 1 Nothing : Maybe.Maybe Msg > find 2 Just "You found the bar" : Maybe.Maybe Msg