when package:BNFC

Generalization of when.
Generalization of forM to Monoid.
when for the monoid of endofunctions 'a -> a'.