Skip to content

Commit d127e12

Browse files
authored
Clean up some of the text in the _ section
1 parent ce09aaf commit d127e12

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

content/guides/weird_characters.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -814,16 +814,15 @@ Note that the exclamation mark is often pronounced as bang.
814814

815815
* https://github.com/bbatsov/clojure-style-guide#naming[Clojure Style Guide]
816816

817-
== `_` - Irrelevant var
817+
== `_` - Unused argument
818818

819-
When you see the underscore character used as function arguments or similar,
820-
it is a common _naming convention_ for vars or arguments you are not interested in using.
821-
That is you don't intend to use them, so you aren't really interested in
822-
thinking of a useful name for them.
819+
When you see the underscore character used as function arguments or in a `let` binding,
820+
`_` is a common _naming convention_ to indicate you won't be using this argument.
823821

824822
This is an example using the `add-watch` function that can be used to add
825823
callback style behaviour when atoms change value. Imagine, given an atom, we
826-
want to print the new value every time it changes
824+
want to print the new value every time it changes:
825+
827826
[source,clojure]
828827
----
829828
(def value (atom 0))
@@ -836,8 +835,9 @@ want to print the new value every time it changes
836835
(reset! value 9)
837836
; prints 9
838837
----
838+
839839
`add-watch` takes four arguments, but in our case we only really care about the
840-
last argument - the new value of the atom.
840+
last argument - the new value of the atom so we use `_` for the others.
841841

842842
== `,` - Whitespace character
843843

0 commit comments

Comments
 (0)