Funx.Monad.Either.Left
Mix.install([
{:funx, "0.8.8"}
])
Overview
Represents the Left variant of the Either monad, used to model an error or failure.
This module implements the following protocols:
Funx.Eq: Defines equality checks betweenLeftand otherEithervalues.Funx.Foldable: Providesfold_l/3andfold_r/3to handle folding forLeftvalues.Funx.Monad: Implements thebind/2,map/2, andap/2functions for monadic operations.Funx.Ord: Defines ordering logic forLeftandRightvalues.
The Left monad propagates the wrapped error through operations without executing the success logic.
Function Examples
import Funx.Monad.Either.Left
alias Funx.Monad.Either.Left
Functions
pure/1
Creates a new Left value.
The pure/1 function wraps a value in the Left monad, representing an error or failure.
Examples
pure("error")