I am trying to write a parser that glues two characters into a string:
(<:>) = liftM2 (\a b -> [a, b]) mychar :: Parser String mychar = (char '\\') <:> (noneOf "u")
Is it possible to make it more elegant? I'm a newbie. Please, help.
Another choice:
mychar = sequence [char '\\', noneof "u"]