andThenForResult
Returns Err(E) if the input is Err(E),
otherwise calls transformer with the value and returns the result.
XXX:
Some languages call this operation flatmap.
But we don't provide flatMap() as alias of this function
to sort with other APIs.