4.35 Exercise 4.35
I’m choosing that an-integer-between should be inclusive with the lower bound and exclusive on the right. I’m also treating any case where the first argument is not lower than the second as a failure, because then a natural solution falls out:
(define (an-integer-between i j) (require (< i j)) (amb i (an-integer-between (+ i 1) j)))