3 ms·
Amb is implemented with a backtracking evaluator and supports a try-again operation for requesting all valid outputs (universes). This library just forks the pr
by dangirsh 11y ago
Amb is implemented with a backtracking evaluator and supports a try-again operation for requesting all valid outputs (universes). This library just forks the process for each "universe" and kills the ones where fail is called (including failing assertions). It can only return the first valid value.
This library is significantly less useful than amb for non-deterministic computing, but that doesn't seem to be the goal...