Sha256: 0ba5d1723854cc745d59fd352fec55eb638c56424b806fa324ee5796e128abc5
Contents?: true
Size: 567 Bytes
Versions: 8
Compression:
Stored size: 567 Bytes
Contents
# frozen_string_literal: true module Kind class Either::Left < Either::Monad def left? true end def value_or(default = UNDEFINED, &block) Error.invalid_default_arg! if UNDEFINED == default && !block UNDEFINED != default ? default : block.call(value) end def map(&_) self end alias_method :map!, :map alias_method :then, :map alias_method :then!, :map alias_method :and_then, :map alias_method :and_then!, :map def inspect '#<%s value=%p>' % ['Kind::Left', value] end end end
Version data entries
8 entries across 8 versions & 1 rubygems