Advertisement
Guest User

amb time 2

a guest
May 18th, 2019
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 0.22 KB | None | 0 0
  1. (let ([x (range 1 10)] [y (range 1 10)] [z (range 1 10)])
  2.   (if (= (* z z) (+ (* x x) (* y y)))
  3.       (cons x (cons y z))
  4.       (amb)))
  5. '(4 3 . 5)
  6. '(3 4 . 5)
  7. '(8 6 . 10)
  8. '(6 8 . 10)
  9. cpu time: 56 real time: 56 gc time: 15
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement