matchM package:unipatterns

Try to run an effectful function, on pattern match fail behave like pure
>>> matchM (\'a' -> Just 'A') 'a'
Just 'A'

>>> matchM (\'a' -> Just 'A') 'x'
Just 'x'