Rete.Network.Node.Production (Rete v0.2.0)

Copy Markdown View Source

A terminal node for a rule. Firing it calls :rhs with the token's bindings, and logically inserts whatever comes back.

:salience is the user's ordering. :internal_salience breaks ties in favour of machinery the user did not write. An extracted negation helper has to run before the rule that negates its marker. Otherwise, that rule fires once against an absence that had merely not been computed yet.

Summary

Types

t()

@type t() :: %Rete.Network.Node.Production{
  bind: [atom()],
  generated?: boolean(),
  hash: integer(),
  id: non_neg_integer() | nil,
  internal_salience: integer(),
  module: module(),
  name: atom(),
  rhs: fun(),
  salience: integer()
}