A set of conditional functions for maipulating Lists.
addIf : Basics.Bool -> a -> List a -> List a
Add an element to the front of a List only if the first condition is parameter evaluates to True.
addWhen : Maybe a -> List a -> List a
Add an element to the front of a List only if the value is not Nothing
attachIf : Basics.Bool -> a -> List a -> List a
Add an element to the end of a List, if the first parameter evalutes to True.
attachWhen : Maybe a -> List a -> List a
Add an element to the end of a List, if the element is not Nothing.
mapIf : Basics.Bool -> (a -> a) -> List a -> List a
Conditional application of a mapping function.
filterIf : Basics.Bool -> (a -> Basics.Bool) -> List a -> List a
Conditional application of a filtering.
filterMapIf : Basics.Bool -> (a -> Maybe a) -> List a -> List a
Conditional application of a filterMap function.
reverseIf : Basics.Bool -> List a -> List a
Conditional list reverse.
appendIf : Basics.Bool -> List a -> List a -> List a
Perform a List.append only if the first condition is met, otherwise the second List defines the result.
appendWhen : Maybe (List a) -> List a -> List a
Perform a List.append only if the first parameter is not Nothing.
concatMapIf : Basics.Bool -> (a -> List a) -> List a -> List a
Conditional concatMap.
intersperseIf : Basics.Bool -> a -> List a -> List a
Conditional application of intersperse.
sortIf : Basics.Bool -> List comparable -> List comparable
Conditional sort.
sortByIf : Basics.Bool -> (a -> comparable) -> List a -> List a
Conditional sortBy.
takeIf : Basics.Bool -> Basics.Int -> List a -> List a
Conditional application of List.take.
dropIf : Basics.Bool -> Basics.Int -> List a -> List a
Conditional application of List.drop.