if-amb ( true false -- ? )
Simple backtracking non-determinism

Next:amb-all ( quot -- )


Vocabulary
backtrack

Inputs
truea quotation with stack effect ( -- ? )
falsea quotation


Outputs
?a boolean


Word description
Execute the first quotation and return t if it returns t itself. If it fails with fail or returns f, then the second quotation is executed and f is returned.

Definition