[
    {
        "name": "Either",
        "comment": "\nA generic structure for a type with two possibilities: a `Left a` or\na `Right b`.\n\n\n# Definition\n@docs Either\n\n# Mapping (Functor)\n@docs map, map2, map3, map4, mapLeft, mapRight, mapBoth\n\n# Applying (Applicative)\n@docs singleton, andMap, andMapLeft, andMapRight\n\n\n# Folding (Foldable)\n@docs length, foldr\n\n# Chaining (Monad)\n@docs andThen, andThenLeft, andThenRight\n\n# List Helpers\n@docs lefts, rights, partition\n\n# Maybe Helpers\n@docs toMaybe, leftToMaybe, rightToMaybe, fromMaybe, leftFromMaybe, rightFromMaybe\n\n# Result Helpers\n@docs toResult, fromResult\n\n# Rest of the Helpers\n@docs isLeft, isRight, fromLeft, fromRight, withDefault, unpack, unwrap, swap\n",
        "unions": [
            {
                "name": "Either",
                "comment": " ",
                "args": [
                    "a",
                    "b"
                ],
                "cases": [
                    [
                        "Left",
                        [
                            "a"
                        ]
                    ],
                    [
                        "Right",
                        [
                            "b"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "andMap",
                "comment": " Apply the function that is inside `Either` to a value that is inside\n`Either`. Return the result inside `Either`. If one of the `Either`\narguments is `Left x`, return `Left x`. Also known as `apply`.\n\n    Left \"Hello\" `andMap` Left \"World\" == Left \"Hello\"\n    Left \"Hello\" `andMap` Right 2 == Left \"Hello\"\n    Right ((+) 1) `andMap` Left \"World\" == Left \"World\"\n    Right ((+) 1) `andMap` Right 2 == Right 3\n",
                "type": "Either x (a -> b) -> Either x a -> Either x b"
            },
            {
                "name": "andMapLeft",
                "comment": " Apply the function that is inside `Either` to a value that is inside\n`Either`. Return the result inside `Either`. If one of the `Either`\narguments is `Right x`, return `Right x`. Also known as `apply`.\n\n    Left (flip (++) \"!!\" ) `andMap` Left \"Hello\" == Left \"Hello!!\"\n    Left (flip (++) \"!!\" ) `andMap` Right 2 == Right 2\n    Right 99 `andMap` Left \"World\" == Right 99\n    Right 99 `andMap` Right 2 == Right 99\n",
                "type": "Either (a -> b) x -> Either a x -> Either b x"
            },
            {
                "name": "andMapRight",
                "comment": " Alias for `andMap`.\n",
                "type": "Either x (a -> b) -> Either x a -> Either x b"
            },
            {
                "name": "andThen",
                "comment": " Chain together in many computations that will stop computing if\na chain is on a `Left`. Also known as `bind`.\n\n    Left \"Hello\" `andThen` ((+) 1 >> Right) == Left \"Hello\"\n    Right 2 `andThen` ((+) 1 >> Right) == Right 3\n",
                "type": "Either x a -> (a -> Either x b) -> Either x b"
            },
            {
                "name": "andThenLeft",
                "comment": " Chain together in many computations that will stop computing if\na chain is on a `Right`. Also known as `bind`.\n\n    Left \"Hello\" `andThen` (flip (++) \"!!\" >> Left) == Left \"Hello!!\"\n    Right 2 `andThen` (flip (++) \"!!\" >> Left) == Right 2\n",
                "type": "Either a x -> (a -> Either b x) -> Either b x"
            },
            {
                "name": "andThenRight",
                "comment": " Alias for `andThen`.\n",
                "type": "Either x a -> (a -> Either x b) -> Either x b"
            },
            {
                "name": "foldr",
                "comment": " Folds an `Either` over a function with an accumulator. If\nit is a `Right` the function is applied with the accumulator.\nIf it is a `Left` only the accumulator is returned.\n\n    foldr (*) 2 <| Left 3 == 2\n    foldr (*) 2 <| Right 3 == 6\n",
                "type": "(a -> b -> b) -> b -> Either a a -> b"
            },
            {
                "name": "fromLeft",
                "comment": " Extract left value or a default.\n\n    fromLeft \"World\" <| Left \"Hello\" == \"Hello\"\n    fromLeft \"World\" <| Right 2 == \"World\"\n",
                "type": "a -> Either a b -> a"
            },
            {
                "name": "fromMaybe",
                "comment": " Convert from a `Maybe` to `Either` with a default value\nfor `Left` for `Nothing`.\n\n    fromMaybe \"Hello\" <| Just 2 == Right 2\n    fromMaybe \"Hello\" Nothing == Left \"Hello\"\n",
                "type": "a -> Maybe b -> Either a b"
            },
            {
                "name": "fromResult",
                "comment": " Convert from `Result` to `Either`.\n\n    fromResult <| Err \"World\" == Left \"World\"\n    fromResult <| Ok 2 == Right 2\n",
                "type": "Result a b -> Either a b"
            },
            {
                "name": "fromRight",
                "comment": " Extract right value or a default.\n\n    fromRight 3 <| Left \"Hello\" == 3\n    fromRight 3 <| Right 2 == 2\n",
                "type": "b -> Either a b -> b"
            },
            {
                "name": "isLeft",
                "comment": " Returns `True` if argument is `Left _`\n\n    isLeft <| Left \"World\" == True\n    isLeft <| Right 2 == False\n",
                "type": "Either a b -> Bool"
            },
            {
                "name": "isRight",
                "comment": " Returns `True` if argument is `Right _`\n\n    isRight <| Left \"World\" == False\n    isRight <| Right 2 == True\n",
                "type": "Either a b -> Bool"
            },
            {
                "name": "leftFromMaybe",
                "comment": " Convert from a `Maybe` to `Either` with a default value\nfor `Right` for `Nothing`.\n\n    leftFromMaybe 3 <| Just \"World\" == Left \"World\"\n    leftFromMaybe 3 Nothing == Right 3\n",
                "type": "b -> Maybe a -> Either a b"
            },
            {
                "name": "leftToMaybe",
                "comment": " `Maybe` get the `Left` side of an `Either`.\n\n    leftToMaybe <| Left \"World\" == Just \"World\"\n    leftToMaybe <| Right 2 == Nothing\n",
                "type": "Either a x -> Maybe a"
            },
            {
                "name": "lefts",
                "comment": " Converts a `List` of `Either a x` to a List of `a`.\n\n    lefts [ Left \"Hello\", Right 2 ] == [ \"Hello\" ]\n",
                "type": "List (Either a x) -> List a"
            },
            {
                "name": "length",
                "comment": " Returns the length of an `Either`. This happens to be `0` for a\n`Left` and `1` for a `Right`.\n\n    length <| Left 2 == 0\n    length <| Right \"Sharks\" == 1\n",
                "type": "Either a b -> Int"
            },
            {
                "name": "map",
                "comment": " Apply a function to an `Either`. If the argument is `Right`, it\nwill be converted.  If the argument is an `Left`, the same left value\nwill propogate through.\n\n    map ((+) 1) <| Left \"Hello\" == Left \"Hello\"\n    map ((+) 1) <| Right 2 == Right 3\n",
                "type": "(a -> b) -> Either x a -> Either x b"
            },
            {
                "name": "map2",
                "comment": " Apply a function to two eithers, if both arguments are `Right`.\nIf not, the first argument which is a `Left` will propagate through.\nAlso known as `liftA2`.\n\n    map2 (+) (Left \"Hello\") <| Left \"World\" == Left \"Hello\"\n    map2 (+) (Left \"Hello\") <| Right 3 == Left \"Hello\"\n    map2 (+) (Right 2) <| Left \"World\" == Left \"World\"\n    map2 (+) (Right 2) <| Right 3 == Right 5\n",
                "type": "(a -> b -> c) -> Either x a -> Either x b -> Either x c"
            },
            {
                "name": "map3",
                "comment": " Like `map2`, but with 3 eithers. Also known as `liftA3`\n",
                "type": "(a -> b -> c -> d) -> Either x a -> Either x b -> Either x c -> Either x d"
            },
            {
                "name": "map4",
                "comment": " Like `map2`, but with 4 eithers. Also known as `liftA4`\n",
                "type": "(a -> b -> c -> d -> e) -> Either x a -> Either x b -> Either x c -> Either x d -> Either x e"
            },
            {
                "name": "mapBoth",
                "comment": " Apply the first argument function to a `Left` and the second\nargument function to a `Right` of an `Either`.\n\n    mapBoth (flip (++) \"!!\") ((+) 1) <| Left \"Hello\" == Left \"Hello!!\"\n    mapBoth (flip (++) \"!!\") ((+) 1) <| Right 2 == Right 3\n",
                "type": "(a -> b) -> (c -> d) -> Either a c -> Either b d"
            },
            {
                "name": "mapLeft",
                "comment": " Apply a function to the `Left` of an `Either`.\n\n    mapLeft ((+) 1) <| Left 2 == Left 3\n    mapLeft ((+) 1) <| Right 2 == Right 2\n",
                "type": "(a -> b) -> Either a x -> Either b x"
            },
            {
                "name": "mapRight",
                "comment": " Alias for `map`.\n",
                "type": "(a -> b) -> Either x a -> Either x b"
            },
            {
                "name": "partition",
                "comment": " Converts a `List` of `Either a b`, into a tuple2 where\nthe first value is a `List a` and the second is `List b`.\n\n    partition [ Left \"Hello\", Right 2 ] == ( [ \"Hello\" ], [ 2 ] )\n",
                "type": "List (Either a b) -> ( List a, List b )"
            },
            {
                "name": "rightFromMaybe",
                "comment": " Alias for `fromMaybe`.\n",
                "type": "a -> Maybe b -> Either a b"
            },
            {
                "name": "rightToMaybe",
                "comment": " Alias for `toMaybe`.\n",
                "type": "Either x b -> Maybe b"
            },
            {
                "name": "rights",
                "comment": " Converts a `List` of `Either x b` to a List of `b`.\n\n    rights [ Left \"Hello\", Right 2 ] == [ 2 ]\n",
                "type": "List (Either x b) -> List b"
            },
            {
                "name": "singleton",
                "comment": " Create a `singleton` from a value to an `Either` with a `Right`\nof the same type.  Also known as `pure`. Use the `Left` constructor\nfor a singleton of the `Left` variety.\n\n    singleton 2 == Right 2\n",
                "type": "b -> Either x b"
            },
            {
                "name": "swap",
                "comment": " Swap the `Left` and `Right` sides of an `Either`.\n\n    swap <| Left \"World\" == Right \"World\"\n    swap <| Right 2 == Left 2\n",
                "type": "Either a b -> Either b a"
            },
            {
                "name": "toMaybe",
                "comment": " `Maybe` get the `Right` side of an `Either`.\n\n    toMaybe <| Left \"World\" == Nothing\n    toMaybe <| Right 2 == Just 2\n",
                "type": "Either x b -> Maybe b"
            },
            {
                "name": "toResult",
                "comment": " Convert from `Either` to `Result`.\n\n    toResult <| Left \"World\" == Err \"World\"\n    toResult <| Right 2 == Ok 2\n",
                "type": "Either a b -> Result a b"
            },
            {
                "name": "unpack",
                "comment": " Given a function for both `Left` and `Right` to to type a generic\ntype `c`, collapse down the `Either` to a value of that type.\n\n    unpack identity toString <| Left \"World\" == \"World\"\n    unpack identity toString <| Right 2 == \"2\"\n",
                "type": "(a -> c) -> (b -> c) -> Either a b -> c"
            },
            {
                "name": "unwrap",
                "comment": " Apply a function to `Right` value. If argument was a `Left` use the\ndefault value. Equivalent to `Either.map >> Either.fromRight`.\n\n    unwrap 99 ((+) 1) <| Left \"Hello\" == 99\n    unwrap 99 ((+) 1) <| Right 2 == 3\n",
                "type": "c -> (b -> c) -> Either x b -> c"
            },
            {
                "name": "withDefault",
                "comment": " Alias for `fromRight`.\n",
                "type": "b -> Either a b -> b"
            }
        ],
        "binops": []
    }
]