This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0
README Byte

Carry

Opaque type representing the result of an operation and whether or not there were any carries.

Unwrapping

unwrap : Carry a -> a

Converts a Carry to it's value.

check : Carry a -> Bool

Returns True if there was a carry from the resulting operation.

checkHalf : Carry a -> Bool

Returns True if there was a half-carry from the resulting operation.

module Carry
    exposing
        ( check
        , checkHalf
        , unwrap
        )

{-| Opaque type representing the result of an operation and whether or not
there were any carries.

# Unwrapping
@docs unwrap, check, checkHalf

-}

import Internal.Carry exposing (Carry(..))


{-| Converts a `Carry` to it's value.
-}
unwrap : Carry a -> a
unwrap (Carry c) =
    c.value


{-| Returns `True` if there was a carry from the resulting operation.
-}
check : Carry a -> Bool
check (Carry c) =
    c.carry


{-| Returns `True` if there was a half-carry from the resulting
operation.
-}
checkHalf : Carry a -> Bool
checkHalf (Carry c) =
    c.halfCarry