class Fear::PartialFunction::Lifted

@api private

Attributes

pf[R]

Public Class Methods

new(pf) click to toggle source

@param pf [Fear::PartialFunction]

# File lib/fear/partial_function/lifted.rb, line 8
def initialize(pf)
  @pf = pf
end

Public Instance Methods

call(arg) click to toggle source

@param arg [any] @return [Fear::Option]

# File lib/fear/partial_function/lifted.rb, line 16
def call(arg)
  Some.new(pf.call_or_else(arg) { return Fear::None })
end