matchM package:selective

Eliminate all specified values a from f (Either a b) by replacing each of them with a given f a.
Every monad is a multi-way selective functor.