Monadic implementation of 'on'. <Ben>