callback ( head quot: ( callback-env -- ? ) -- )


Vocabulary
logic

Inputs
headan array
quota quotation


Outputs
None

Word description
Set the quotation to be called. Such quotations take an environment which holds the binding of logic variables, and returns t or f as a result of execution. To retrieve the values of logic variables in the environment, use of or at.

Examples
LOGIC-PRED: N_>_0 { N_>_0 N } [ N of 0 > ] callback


See also
callbacks

Definition


:: callback ( head quot: ( callback-env -- ? ) -- )
head def>goal :> head-goal head-goal pred>>
[ { head-goal quot } suffix! ] change-defs drop ;