when package:cond

Generalization of when
A variant of when with a monadic predicate.