class Unparser::Either::Left

def bind(&)

Returns:
  • (Either::Left) -
    def bind(&)
      require_block(&)
    end

    def either(left, _right)

    Parameters:
    • _right (#call) --
    • left (#call) --
    def either(left, _right)
      left.call(value)
    end

    def fmap(&)

    Returns:
    • (Either::Left) -
      def fmap(&)
        require_block(&)
      end

      def from_left

      Returns:
      • (Object) -
      def from_left
        value
      end

      def from_right

      Returns:
      • (Object) -
      def from_right
        if block_given?
          yield(value)
        else
          fail "Expected right value, got #{inspect}"
        end
      end

      def lmap

      Returns:
      • (Either::Right) -
        def lmap
          Left.new(yield(value))
        end