faulty
Wraps a value of type T as a Faulty based on a isFailure.
If the isFailure returns true
, the value is wrapped as a Failure. If the isFailure returns false
, an emptySuccess is returned.
Return
A Faulty containing the value as a Failure or an emptySuccess.
Parameters
T
The type of the value to wrap.
is Failure
A function that determines if the value is a failure.
Otherwise, an emptySuccess is returned.
Return
A Faulty containing the value as a Failure or an emptySuccess.
Parameters
T
The type of the value to wrap.