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 am a newbie. Please help.
Another choice is:
mychar = sequence [char '\\', noneof "u"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With