class Monads::Success(T)

Included Modules

Defined in:

monads/result.cr

Constructors

Instance Method Summary

Instance methods inherited from module Monads::RightBiased(T)

bind(&block : T -> U) : U forall U
bind(lambda : T -> U) : U forall U
bind
, equal?(rhs : RightBiased) : Bool
equal?(rhs : LeftBiased) : Bool
equal?
, failure? : Bool failure?, or(monad) or, success? : Bool success?, tee(&block : T -> U) forall U tee, value! : T value!, value_or(element : U) : T forall U
value_or(&block : -> U) : T forall U
value_or

Instance methods inherited from class Monads::Result(T)

==(rhs : RightBiased | LeftBiased) : Bool ==, bind(&block : T -> U) forall U
bind(lambda : T -> U) forall U
bind
, equal?(rhs : RightBiased | LeftBiased) equal?, failure failure, failure? failure?, fmap(&block : T -> U) forall U fmap, or(monad : Result(U)) forall U or, success? success?, tee(&block : T -> U) forall U tee, value! value!, value_or(element : U) forall U
value_or(&block : -> U) forall U
value_or

Constructor methods inherited from class Monads::Result(T)

new(data : T) new

Constructor Detail

def self.new(data : T) #

[View source]

Instance Method Detail

def failure : T #

[View source]
def fmap(&block : T -> U) : Result forall U #

[View source]