struct Monads::LeftException

Included Modules

Defined in:

monads/either.cr

Constructors

Instance Method Summary

Instance methods inherited from module Monads::Leftable(Exception)

bind(lambda : _ -> _) : Leftable(E) bind, fmap(lambda : _ -> _) : Leftable(E) fmap, map_or(default : U, lambda : _ -> _) forall U map_or, or(monad : Either)
or(lambda : E -> _)
or
, value_or(lambda : E -> _)
value_or(element : U) forall U
value_or

Instance methods inherited from struct Monads::Either(Exception, Nil)

<=>(other : Right)
<=>(other : Left)
<=>
, inspect(io) inspect, left? left?, map_or(default : U, lambda : T -> U) forall U map_or, or(monad : Either)
or(lambda : E -> U) forall U
or(&block : E -> U) forall U
or
, right? right?, to_s to_s, value! : E | T value!, value_or(element : U) forall U
value_or(lambda : E -> U) forall U
value_or(&block : E -> U) forall U
value_or

Constructor methods inherited from struct Monads::Either(Exception, Nil)

new new

Class methods inherited from struct Monads::Either(Exception, Nil)

return(value : T) : Right(T) return

Instance methods inherited from struct Monads::Monad(Nil)

>>(other : Monad(U)) forall U >>, |(other : _ -> Monad(U)) forall U |, bind(lambda : T -> Monad(U)) forall U
bind(&block : T -> Monad(U)) forall U
bind

Constructor methods inherited from struct Monads::Monad(Nil)

new new, return(v : T) : self return

Instance methods inherited from struct Monads::Functor(Nil)

fmap(lambda : T -> U)
fmap(&block : T -> U) forall U
fmap
, initialize initialize

Constructor methods inherited from struct Monads::Functor(Nil)

new new

Constructor Detail

def self.new(data : E) #

[View source]

Instance Method Detail

def <=>(other : LeftException) #

[View source]
def <=>(other : Left) #

[View source]
def <=>(other : Right) #

[View source]
def <=>(other : Either) #

[View source]
def bind(lambda : _ -> _) : LeftException #

[View source]
def fmap(lambda : _ -> _) : LeftException #

[View source]
def map_or(default : U, lambda : _ -> _) forall U #

[View source]
def or(monad : Either) #

[View source]
def or(lambda : E -> _) #

[View source]
def value_or(lambda : E -> _) #

[View source]
def value_or(element : U) forall U #

[View source]