i'm new to haskell and still learning. Can anybody help me with anonymous functions aka lambdas?
The function ifNext parses one input character without remove them from imput. It matches against cond if its true works goes on with thenParser otherwise elseParser .
ifNext :: (Char -> Bool) -> Parser out -> Parser out -> Parser out
ifNext cond thenParser elseParser = if (\x -> cond x ) then thenParser else elseParser
But it does not match the type. Can anyone explain why?