Returns f
applied to the contents of as
if non-empty, otherwise, the zero element of the Monoid
for the type B
.
Returns f
applied to the contents of as
if non-empty, otherwise, the zero element of the Monoid
for the type B
.
Catamorphism over the option.
Catamorphism over the option. Returns the provided function some
applied to item contained in the Option
if it is defined, otherwise, the provided value none
.
Constructs a non-empty list with the given string if it is not empty, otherwise, returns the second argument.
Constructs a non-empty list with the given string if it is not empty, otherwise, returns the second argument.
Constructs a non-empty list with the value if it is not empty, otherwise, throws an error.
Constructs a non-empty list with the value if it is not empty, otherwise, throws an error.
Alias for cata
Alias for cata
Returns the given value if None, otherwise lifts the Some value and passes it to the given function.
Returns the given value if None, otherwise lifts the Some value and passes it to the given function.
Returns the given value if None, otherwise lifts the Some value to Option and passes it to the given function.
Returns the given value if None, otherwise lifts the Some value to Option and passes it to the given function.
Intersperse the element a
between each adjacent pair of elements in as
Intersperse the element a
between each adjacent pair of elements in as
Intersperse the element a
between each adjacent pair of elements in as
Intersperse the element a
between each adjacent pair of elements in as
Returns the item contained in the Option wrapped in type M if the Option is defined, otherwise, the empty value for type M.
Returns the item contained in the Option wrapped in type M if the Option is defined, otherwise, the empty value for type M.
Returns the same String value if the given value is 1 otherwise pluralises this String by appending an "s" unless this String ends with "y" and not one of ["ay", "ey", "iy", "oy", "uy"] in which case the 'y' character is chopped and "ies" is appended.
Returns the same String value if the given value is 1 otherwise pluralises this String by appending an "s" unless this String ends with "y" and not one of ["ay", "ey", "iy", "oy", "uy"] in which case the 'y' character is chopped and "ies" is appended.