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::Functor
Instance Method Details
#==(other) ⇒ Object
112 113 114 115 116 117 118 119 |
# File 'lib/data.maybe.rb', line 112 def == other case other when Just other.map { |v| return v == @v } else false end end |