3 ms·
I'm just thinking out aloud, so I'm probably -- if not completely wrong -- at best sketchy on details! That being said, `amb` could be a function/macro that use
by Xophmeister 6y ago
I'm just thinking out aloud, so I'm probably -- if not completely wrong -- at best sketchy on details! That being said, `amb` could be a function/macro that uses a continuation in such a way that, when a failure is encountered (however that may be defined), it can backtrace and try with the next value. By using continuations with some encapsulation of the call stack, it doesn't need to envelope the surrounding code and can just "rewind".