[racket] cond else and
For example:
(define (draw-shapes a-posn a-lon)
(cond
[(empty? a-lon) true]
[else (and (draw-circle a-posn (first a-lon))
(draw-shapes a-posn (rest a-lon)))]))
Why is there an AND needed in the else clause?
ELSE is normaly used for all other cases, so you don't need to test anymore.
In fact there is nothing tested in this line, it is just used to be
able to execute two expressions?
Isn't there an other solution for this?
That 's my point of view, I probably make a mistake, but I can't
figure out which one.
Greetings,
Frank