Skip to content

Commit 47f0027

Browse files
committed
tweaking
1 parent 74a0605 commit 47f0027

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

content/guides/destructuring.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Associative destructuring, however, also allows you to supply a default value if
273273
;= Category not found
274274
----
275275

276-
To supply default values for keys that are not present in the input map, you can use the `:or` directive, whose value is a map of binding names or [since 1.13] keys to default values. Thus here `"Category not found"` will be used as the value for the binding category if the key `:category` is not in the input map (`client`). Note that if an unadorned symbol is used as a key in the `:or` map but not yet in any binding the entry is a no-op.
276+
To supply default values for keys that are not present in the input map, you can use the `:or` directive, whose value is a map of binding names or [since 1.13] keys to default values. Thus here `"Category not found"` will be used as the value for the binding category if the key `:category` is not in the input map (`client`). Note that if an unadorned symbol is used as a key in the `:or` map but not in any binding, then the entry is ignored.
277277

278278
To capture the default values stated in the `:or` map for some purpose later in your code without restating them, you can use the `:defaults` directive [since 1.13], which binds a name to a map, created during destructuring, of keys to their default values.
279279

content/reference/special_forms.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ can be written:
319319
(let [{:keys [fred ethel lucy]} m] ...
320320
----
321321

322-
As of Clojure 1.6, you can also use prefixed map keys in the map destructuring form:
322+
You can also use prefixed map keys in the map destructuring form:
323323

324324
[source,clojure]
325325
----

0 commit comments

Comments
 (0)