predicator v0.1.4 Predicator.Evaluator

Link to this section Summary

Functions

execute/2 takes an instruction set and context struct

Link to this section Functions

Link to this function execute(inst, context_struct \\ %{})
execute(list, struct | map) ::
  boolean |
  {:error, Predicator.InstructionError.t}

execute/2 takes an instruction set and context struct

Example instructions sets:

iex> execute([[“lit”, true]]) true

iex> [[“lit”, 30], [“lit”, 432], [“compare”, “GT”]]

inst = [[“lit”, false], [“jtrue”, 4], [“lit”, 1], [“lit”, 1], [“compare”, “EQ”]]