-
-
Notifications
You must be signed in to change notification settings - Fork 0
solvers asyncGen
Eugene Lazutkin edited this page Apr 7, 2026
·
3 revisions
Asynchronous generator-based solver. Combines lazy enumeration with await-bearing goal predicates.
import asyncGen from 'yopl/solvers/asyncGen.js';
asyncGen(rules, name, args): AsyncGenerator<Env>
import {variable} from 'deep6/env.js'; import assemble from 'deep6/traverse/assemble.js'; import asyncGen from 'yopl/solvers/asyncGen.js'; const rules = {one: () => [{args: [1]}]}; const X = variable('X'); for await (const env of asyncGen(rules, 'one', [X])) { console.log(assemble(X, env)); // 1 }