Using (verify false) is a clever idea. It's sort of like using return in a function for some other language. You might have gotten the same effect by using else. For example, this might work:
However, it does use else twice to create an if-elseif-else structure, and breaking out with something like a return is an equally valid way to handle this.
Using (verify false) is a clever idea. It's sort of like using return in a function for some other language. You might have gotten the same effect by using else. For example, this might work:
(define push-n (n (while on-board? (if empty? add else (if (in-zone? board-edge-n) add else (cascade n))))))
However, it does use else twice to create an if-elseif-else structure, and breaking out with something like a return is an equally valid way to handle this.