class Obfusk::Monads::Either
Public Class Methods
bind_pass(m, &b)
click to toggle source
# File lib/obfusk/monads.rb, line 65 def self.bind_pass(m, &b) m.match Left: -> (_) { m }, Right: -> (x) { b[x.value] } end
mreturn(x)
click to toggle source
# File lib/obfusk/monads.rb, line 62 def self.mreturn(x) Right(x) end