class Dry::Logic::Rule::Check

def self.new(predicate, options)

def self.new(predicate, options)
  keys = options.fetch(:keys)
  evaluator = Evaluator::Set.new(keys)
  super(predicate, options.merge(evaluator: evaluator))
end

def call(input)

def call(input)
  args = evaluator[input].reverse
  *head, tail = args
  Logic.Result(predicate.curry(*head).(tail), curry(*args), input)
end

def evaluate(input)

def evaluate(input)
  evaluator[input].first
end

def initialize(predicate, options)

def initialize(predicate, options)
  super
  @name = options.fetch(:name)
  @evaluator = options[:evaluator]
end

def to_ast

def to_ast
  [type, [name, predicate.to_ast]]
end

def type

def type
  :check
end