adds whenDefined(callable $f)

This method complements map() for when the return value of the passed
callable is not interesting, but the passed function has side-effects.