See this example:
(let [x 1 y 2]
(match [x y]
[1 b] b
[a 2] a
:else nil))
;=> 2
I can't get my head around a few things:
- Does
1matchxand gets bound tob? - Does
2matchyand gets bound toa? - Assuming I got the two points above right, why return
ainstead ofbconsidering they both matched part of[x y]. Is it because it is the last clause?