rule

open fun rule(function: S.() -> Any): Rule

Runs function with a newScope as its receiver and coerces its result to a Rule — typically built via the head ifbody / head impliedBybody infix builders from LogicProgrammingScopeWithOperators.

Throws

if function's result does not toTerm into a Rule.