Function
liftResult
(
f: (...a: A) => Result.Result<B, E>
)
Source from the content-addressed store, hash-verified
| 4164 | * @since 4.0.0 |
| 4165 | */ |
| 4166 | export const liftResult = <A extends Array<unknown>, E, B>( |
| 4167 | f: (...a: A) => Result.Result<B, E> |
| 4168 | ) => |
| 4169 | (...a: A): Array<B> => { |
| 4170 | const e = f(...a) |
| 4171 | return Result.isFailure(e) ? [] : [e.success] |
| 4172 | } |
| 4173 | |
| 4174 | /** |
| 4175 | * Checks whether all elements satisfy the predicate. Supports refinements for |
Callers
nothing calls this directly
Tested by
no test coverage detected