Class: Monads::Nothing

Inherits:
Maybe
  • Object
show all
Defined in:
lib/ruby-monads/maybe.rb

Instance Method Summary collapse

Methods inherited from Maybe

unit, #unwrap

Methods included from Monad

#fmap, included, #join, #method_missing

Constructor Details

#initializeNothing

Returns a new instance of Nothing.



39
40
# File 'lib/ruby-monads/maybe.rb', line 39

def initialize
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Monads::Monad

Instance Method Details

#bind(&block) ⇒ Object

bind

(a -> M b) -> M a -> M b



43
44
45
# File 'lib/ruby-monads/maybe.rb', line 43

def bind(&block)
  self
end