The cond Expression

When if statements are nested more than one or two levels, it is often clearer to use Racket's cond expression:
      (cond (test1 action1)
            (test2 action2)
            .
            .
            (testn actionn)
            (else actionn+1))

This has the same meaning as the nested if from before:

cond details: