[v3] Implement new Concept Exercise: `Sequential Destructuring`
This issue describes how to implement the Sequential Destructuring concept exercise for the Clojure track.
Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
Please also watch the following video:
Goal
The goal of this exercise is to teach the student how Destructuring is implemented in Clojure, in particular when operating on items that are sequential, which is known as Sequential Destructuring.
Learning objectives
- Understand Clojure's destructuring syntax to bind names to the values inside a sequential data structure.
- How to use
&to combine the tail elements into a sequence. - Bind the entire vector to a symbol with
:as - Know of the underscore (
_) convention to ignore bindings that you don’t intend on using - Know how these techniques can be combined and arbitrarily nested
Out of scope
- Associative destructuring
- Performance characteristics
Concepts
vectorslocal-variablessequences
Prerequisites
basicsvectorslocal-variablessequences
Resources to refer to
Clojure docs - Sequential Destructuring
Representer
The Clojure Representer is currently being implemented and contributions are welcome.
Analyzer
The Clojure Analyzer is currently being implemented and contributions are welcome.
Implementing
To implement a concept exercise, the following files must be created:
languages
└── clojure
└── exercises
└── concept
└── <SLUG>
├── .docs
| ├── instructions.md
| ├── introduction.md
| ├── hints.md
| └── after.md (optional)
├── .meta
| |── design.md
| └── Example.clj
├── <NAME>.clj
└── <NAME>_test.clj
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.