Class: Kleisli::Maybe::None
- Inherits:
-
Kleisli::Maybe
- Object
- Functor
- Kleisli::Monad
- Kleisli::Maybe
- Kleisli::Maybe::None
- Defined in:
- lib/kleisli/maybe.rb
Instance Attribute Summary
Attributes inherited from Kleisli::Maybe
Instance Method Summary collapse
- #>(block) ⇒ Object
- #fmap(&f) ⇒ Object
- #or(other = self, &other_blk) ⇒ Object
- #to_s ⇒ Object (also: #inspect)
Methods inherited from Kleisli::Maybe
Methods inherited from Kleisli::Monad
Instance Method Details
#>(block) ⇒ Object
33 34 35 |
# File 'lib/kleisli/maybe.rb', line 33 def >(block) self end |
#fmap(&f) ⇒ Object
29 30 31 |
# File 'lib/kleisli/maybe.rb', line 29 def fmap(&f) self end |
#or(other = self, &other_blk) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/kleisli/maybe.rb', line 37 def or(other=self, &other_blk) if other_blk other_blk.call else other end end |
#to_s ⇒ Object Also known as: inspect
45 46 47 |
# File 'lib/kleisli/maybe.rb', line 45 def to_s "None" end |