bind<T extends Object> method
- @override
- @useResult
- Result<
T, F> function(- S success
override
If this is a Success
, maps S
to Result, otherwise returns F
untouched.
See pipe for an asynchronous variant of this function.
Success(1).bind((v) => Failure(v.toString())); // Failure('1')
Failure(2).bind((v) => Failure(v.toString())); // Failure(2)
Implementation
@override
@useResult Result<T, F> bind<T extends Object>(Result<T, F> Function(S success) function) => function(success);