The case form dispatches to a clause by matching the result of an expression to the values for the clause:
Each datum will be compared to the result of expr using equal? , and then the corresponding bodys are evaluated. The case form can dispatch to the correct clause in O(log N) time for N datums.
Multiple datums can be supplied for each clause, and the corresponding bodys are evaluated if any of the datums match.
2
'two
The last clause of a case form can use else , just like cond :
For more general pattern matching (but without the dispatch-time guarantee), use match , which is introduced in Pattern Matching.