pipe<T2> method
If result is Err then returns this Err as is.
If result is Ok then returns result of call f(result.val).
If result of call f() is null - returns Err('function returned null').
If result of call f() is Result - returns it as is.
If call of f() throws exception, then returns Err.
Implementation
Future<Result<T2>> pipe<T2>(Function(T) f) async =>
then((result) => result.pipe(f));