Extensions to Result and Result.Extra modules
providing functions to work with List.NoneEmpty.NonEmpty.
It's safe to import this module as Result:
import Result.NonEmpty as Resultall functions in this module use Ne suffix to prevent collisions with
List based alternatives.
Like combineNe, but map a function over each element of the list first.
If every function call succeeds (returns Just), combineMapNe will return a non empty list.
If any function call fails (returns Nothing), combineMap will return Nothing.
combineNe is equivalent to combineMapNe identity.
combineMapNe (\x -> Ok (x * 10)) ( 1, [ 2, 3, 4, 5 ] )
--> Ok ( 10, [ 20, 30, 40, 50 ] )
combineMapNe identity ( Ok 1, [ Ok 2, Err "error 1", Err "error 2" ] )
--> Err "error 1"
If every
Resultin the nonempty list isOk, return all of the values unwrapped. If there are anyErrs, return the firstErrinstead.