lib/rumonade/either.rb in rumonade-0.3.0 vs lib/rumonade/either.rb in rumonade-0.4.0
- old
+ new
@@ -3,9 +3,13 @@
module Rumonade
# Represents a value of one of two possible types (a disjoint union).
# The data constructors {Rumonade::Left} and {Rumonade::Right} represent the two possible values.
# The +Either+ type is often used as an alternative to {Rumonade::Option} where {Rumonade::Left} represents
# failure (by convention) and {Rumonade::Right} is akin to {Rumonade::Some}.
+ #
+ # This implementation of +Either+ also contains ideas from the +Validation+ class in the
+ # +scalaz+ library.
+ #
# @abstract
class Either
def initialize
raise(TypeError, "class Either is abstract; cannot be instantiated") if self.class == Either
end
\ No newline at end of file