krisajenkins/elm-exts/5.1.0

NOTE: this package is not compatible with Elm 0.19.1

Exts.Maybe

Extensions to the core Maybe library.

isJust : Maybe a -> Bool

Boolean checks.

isNothing : Maybe a -> Bool
maybeString : Maybe String -> String

Simple transform for displaying Maybe Strings.

maybeNumber : Maybe num -> String

Simple transform for displaying Maybe nums.

mapMaybe : (a -> Maybe b) -> List a -> List b

Run a function over a List, dropping items for which the function returns Nothing.

maybe : b -> (a -> b) -> Maybe a -> b

Apply a function to a value, returning the default if the function returns Nothing.

bind : Maybe a -> (a -> Maybe b) -> Maybe b

Monadic bind for the Maybe type.