Assorted primitives
(define CONSTANT "value") ; constant definition
(check-expect (aspect-ratio CONSTANT) true) ; like assert in Python
(define (aspect-ratio argument) ; function definition
(if (> (image-height img) (image-width img)) ; operators and if/else
"tall"
(if (= (image-height img) (image-width img))
"square"
"wide)))Using cond to avopid nested if/else. More like if/elseif.
(define (aspect-ratio img)
(cond [(> (image-height img) (image-width img)) "tall"] ; note that in Racket () and [] are equivalent
[(= (image-height img) (image-width img) "square"]
[else "wide"])) ; "else" is optional, it can be another condition.