Module: Fr
- Defined in:
- lib/fr.rb,
lib/fr/maybe.rb,
lib/fr/monad.rb,
lib/fr/thunk.rb,
lib/fr/either.rb,
lib/fr/errors.rb,
lib/fr/monoid.rb,
lib/fr/functor.rb,
lib/fr/szipper.rb,
lib/fr/tzipper.rb,
lib/fr/monad/maybe.rb,
lib/fr/monad/state.rb,
lib/fr/monad/either.rb,
lib/fr/monad/random.rb,
lib/fr/monad/reader.rb,
lib/fr/monad/writer.rb,
lib/fr/monoid/maybe.rb,
lib/fr/szipper/node.rb,
lib/fr/tzipper/node.rb,
lib/fr/tzipper/path.rb,
lib/fr/monoid/either.rb,
lib/fr/szipper/enumerable.rb,
lib/fr/errors/zipper_error.rb,
lib/fr/szipper/head_cursor.rb,
lib/fr/tzipper/root_cursor.rb,
lib/fr/szipper/edited_cursor.rb,
lib/fr/tzipper/edited_cursor.rb,
lib/fr/szipper/abstract_cursor.rb,
lib/fr/szipper/memoized_cursor.rb,
lib/fr/tzipper/abstract_cursor.rb,
lib/fr/tzipper/dangling_cursor.rb,
lib/fr/tzipper/memoized_cursor.rb,
lib/fr/szipper/head_prev_cursor.rb,
lib/fr/szipper/tail_next_cursor.rb
Defined Under Namespace
Modules: Errors, Functor, Monad, Monoid, Reader, SZipper, State, TZipper, Writer
Classes: Either, Maybe, Random, Thunk
Class Method Summary
collapse
Class Method Details
.left(value) ⇒ Object
30
31
32
|
# File 'lib/fr.rb', line 30
def self.left(value)
Fr::Either::Left.new(value)
end
|
26
27
28
|
# File 'lib/fr.rb', line 26
def self.none
Fr::Maybe::None
end
|
.right(value) ⇒ Object
34
35
36
|
# File 'lib/fr.rb', line 34
def self.right(value)
Fr::Either::Right.new(value)
end
|
.some(value) ⇒ Object
22
23
24
|
# File 'lib/fr.rb', line 22
def self.some(value)
Fr::Maybe::Some.new(value)
end
|
.thunk(&block) ⇒ Object
18
19
20
|
# File 'lib/fr.rb', line 18
def self.thunk(&block)
Thunk.new(block)
end
|