clojure / clojure/clojure-site

Document destructuring of singleton map sequences

Open
#688 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
259
Forks
275
PR merge metrics
No merged PRs in 30d

Description

Since clojure 1.11 (as per CLJ-2603), destructuring a sequence containing a single map can directly bind to the map contents. An example of this can be seen here. It might be a good idea to mention this in the destructuring guide as this behaviour might be surprising to some (at least it was for me).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked destructuring guide and compare it with the CLJ-2603 example in test/clojure/test_clojure/data_structures.clj. Document that a sequence containing a single map can destructure directly to the map contents, with an example showing the behavior.】【。

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.