---
date: "2023-06-27T09:50:56.000Z"
title: "2023-06-27"
tags: ["clojure"]
draft: false
---

Did some work with Clojure destructuring.

Unpack values into specific variables.

```clojure
user=> (let [[a b c] [1 2 3]] (println a b c))
1 2 3
nil
```

Unpack the first N items, ignoring the rest.

```clojure
user=> (let [[a b] [1 2 3]] (println a b))
1 2
nil
```

Unpack the first N items to variables and capture the rest as an array.

```clojure
user=> (let [[a b & rst] [1 2 3 4 5]] (println a b rst))
1 2 (3 4 5)
nil
```