Class: Just
Instance Method Summary collapse
Methods included from Maybe
#flat_map, #get_or_else, #initialize, #map, #to_s, #when
Methods included from UnionType
Methods included from Helper
Methods included from Control::Monad
Methods included from Control::Applicative
Methods included from Control::Functor
Instance Method Details
#==(other) ⇒ Object
111 112 113 114 115 116 117 118 |
# File 'lib/data.maybe.rb', line 111 def ==(other) case other when Just other.map { |v| return v == @v } else false end end |