Skip to content

Commit 063205f

Browse files
committed
removed 'ignored' language around orphaned :or entires
1 parent 9888ae7 commit 063205f

1 file changed

Lines changed: 1 addition & 1 deletion

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 in any binding, then the entry is ignored.
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, `:or` entries should reference bindings and keys mentioned elsewhere.
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

0 commit comments

Comments
 (0)