Method: Funkr::Types::Failable#mplus

Defined in:
lib/funkr/types/failable.rb

#mplus(m_y) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
# File 'lib/funkr/types/failable.rb', line 55

def mplus(m_y)
  self.match do |x_on|
    x_on.failed { m_y }
    x_on.ok do |x|
      m_y.match do |y_on|
        y_on.failed { self }
        y_on.ok {|y| self.class.ok(x.mplus(y))}
      end
    end
  end
end