benekastah/oppo — Issue #4: Data destructuring
Author: benekastah
Created: 2012-01-30 14:01:01+00:00
State: open

Array destructuring:

```
(def array [1 2 3 4 5])

(def [a b c ...d] array)

(= a 1)
(= b 2)
(= c 3)
(= d [4 5])
```

Map destructuring:

```
(def object {'a 1 'b 2 'c 3})

(def {[a b c]} object)

(= a 1)
(= b 2)
(= c 3)

(def {thing1 'a thing2 'b thing3 'c} object)

(= thing1 1)
(= thing2 2)
(= thing3 3)
```