andre-dietrich / elm-conditional / Conditional.Result

A collection of conditional function that can be applied to Result types.

Common Helpers

mapIf : Basics.Bool -> (a -> a) -> Result x a -> Result x a

Apply the mapping function only if the first condition is met.

Chaining Results

andThenIf : Basics.Bool -> (a -> Result x a) -> Result x a -> Result x a

Apply a "Then" - chaining function only if the first condition is met.