“cond”,”and” and “or” in Scheme
Imagine you wrote if as a function/procedure rather than a user defined macro/syntax: The problem with my-if is that as a procedure every argument gets evaluated before the procedure body gets executed. thus in atom? the parts (not (pair? x)), #t and #f were evaluated before the body of my-if gets executed. For the last example means (add (- a 1) (+ b 1)) gets evaluated regardless of what a … Read more