Skip to content

Instantly share code, notes, and snippets.

@eraserhd
Created June 2, 2020 19:34
Show Gist options
  • Save eraserhd/3bc5dbfae8cb50f6bfc2699f7724c14b to your computer and use it in GitHub Desktop.
Save eraserhd/3bc5dbfae8cb50f6bfc2699f7724c14b to your computer and use it in GitHub Desktop.
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
(2 1)
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
*** ERROR IN #<procedure #6> -- amb: [amb-completion] amb exhausted
1> ,t
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
(1 2)
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
(1 2)
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
(2 1)
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
(2 1)
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
(1 2)
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
(2 1)
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
(1 2)
> (begin-amb (let (x (amb 0 1 2)) (required (not (= 0 x))) (amb-collect x)))
*** ERROR IN #<procedure #7> -- amb: [amb-completion] amb exhausted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment