Skip to content

Commit 8b0856e

Browse files
committed
regenerate site
1 parent d206fe9 commit 8b0856e

File tree

5 files changed

+89
-93
lines changed

5 files changed

+89
-93
lines changed

articles/language/collections_and_sequences/index.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,7 @@ <h2>Language: Collections and Sequences</h2>
245245
</code></pre><pre><code class="klipse-clojure nohighlight">;; in a set, returns the value itself if present
246246
(get #{1 10 100 2 20 200} 1)
247247
;; ⇒ 1
248-
249-
```klipse-clojure
250-
;; returns nil if key is not present
248+
</code></pre><pre><code class="klipse-clojure nohighlight">;; returns nil if key is not present
251249
(get {:a 1 :b 2} :c)
252250
;; ⇒ nil
253251
</code></pre><pre><code class="klipse-clojure nohighlight">;; vector does not have an _index_ of 4. nil is returned
@@ -389,7 +387,7 @@ <h2>Language: Collections and Sequences</h2>
389387
;; ⇒ (0 2 4 6 8)
390388
</code></pre><pre><code class="klipse-clojure nohighlight">(filterv even? (range 10))
391389
;; ⇒ [0 2 4 6 8]
392-
</code></pre><pre><code class="klipse-clojure nohighlight">(filter #(if (&lt; (count %) 5) %) ["Paul" "Celery" "Computer" "Rudd" "Tayne"])
390+
</code></pre><pre><code class="klipse-clojure nohighlight">(filter #(&lt; (count %) 5) ["Paul" "Celery" "Computer" "Rudd" "Tayne"])
393391
;; ⇒ ("Paul" "Rudd")
394392
</code></pre><p>When using sets with <code>filter</code>, remember that if nil or false is in the set and in the collection, then the predicate will return itself: <code>nil</code>.</p><p>In this example, when nil and false are tested with the predicate, the predicate returns nil. This is because if the item is present in the set it is returned. This will cause that item to /not/ be included in the returned lazy-sequence.</p><pre><code class="klipse-clojure nohighlight">(filter #{:nothing :something nil}
395393
[:nothing :something :things :someone nil false :pigeons])
@@ -473,9 +471,7 @@ <h2>Language: Collections and Sequences</h2>
473471
;; ⇒ 7
474472
</code></pre><pre><code class="klipse-clojure nohighlight">(get-in family [:son :pants])
475473
;; ⇒ nil
476-
477-
```klipse-clojure
478-
(def locations
474+
</code></pre><pre><code class="klipse-clojure nohighlight">(def locations
479475
[:office :home :school])
480476

481477
(get-in locations [1])

articles/language/glossary/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h2>Language: Glossary</h2>
7070
<a href="#variadic">variadic</a>.</p><p>Functions can have multiple arity (for example, a function might have
7171
2 different bodies: one for when 2 args are passed, and another when 3
7272
args are passed).</p><h3 id="binding-form">binding-form</h3><p>Could mean one of two things:</p><ol><li><p>the expression you're binding to in a
73-
<a href="#let_binding">let-binding</a>. It might be a simple name, or it
73+
<a href="#let-binding">let-binding</a>. It might be a simple name, or it
7474
might be a data structure used for
7575
<a href="#destructuring">destructuring</a>.</p></li><li><p>Clojure provides the <code>binding</code> macro, used for setting the
7676
thread-local value of a dynamic var. The whole expression (form)
@@ -79,7 +79,7 @@ <h2>Language: Glossary</h2>
7979
depending whether the first arg is less than, equal to or greater than
8080
the second. The stock comparator that Clojure.core comes with is
8181
<code>compare</code>.</p><h3 id="coordinates">coordinates</h3><p>The "group-id/artifact-id version-string" identifier used in your
82-
project.clj to indicate a particular dependency.</p><p>See also <a href="#libspec">libspec</a>.</p><h3 id="destructuring">destructuring</h3><p>The handy trick used in a <a href="#let_binding">let-binding</a> to "unpack" the
82+
project.clj to indicate a particular dependency.</p><p>See also <a href="#libspec">libspec</a>.</p><h3 id="destructuring">destructuring</h3><p>The handy trick used in a <a href="#let-binding">let-binding</a> to "unpack" the
8383
values from a data structure into the locals you're going to use. See
8484
also <a href="#binding-form">binding-form</a> and <a href="/articles/language/functions#destructuring-of-function-arguments">the destructuring section in
8585
the functions
@@ -92,7 +92,7 @@ <h2>Language: Glossary</h2>
9292
function. Functions that are macros are expanded, recursively.</p><p>In general, the next step is to compile this resolved and expanded expression
9393
to bytecode, and then execute the bytecode. There are some exceptions to this
9494
process, such as special forms, or some expressions that the REPL interprets
95-
directly instead of compiling and executing.</p><p>See <a href="https://clojure.org/reference/evaluation">the official evalation reference</a>
95+
directly instead of compiling and executing.</p><p>See <a href="https://clojure.org/reference/evaluation">the official evaluation reference</a>
9696
on clojure.org for more details.</p><h3 id="form">form</h3><p>A valid s-expression. For example: <code>(+ 1 1)</code> and <code>(defn foo [x] (* x x))</code>.</p><h3 id="head-retention">head retention</h3><p><a href="#lazy">Lazy</a> sequences are still <a href="#persistence">persistent</a>. If you
9797
make <em>another</em> data structure using one, the original lazy sequence
9898
will be kept around and not garbage-collected. If the lazy sequence in
@@ -110,7 +110,7 @@ <h2>Language: Glossary</h2>
110110
different than a pure function, in that a pure function will
111111
produce no side effects.</p><h3 id="identity">identity</h3><p>A logical entity in your program that may change over time --- it may
112112
take on different states at different times, but it still means the
113-
same logical entity. Clojure uses <a href="#reference_types">reference types</a>
113+
same logical entity. Clojure uses <a href="#reference-types">reference types</a>
114114
to represent identities. This is not to be confused with the <code>identity</code> function that just returns the argument given to it.</p><h3 id="implicit-do">implicit do</h3><p>The bodies of some expressions act like <code>do</code> in that you can include
115115
multiple expressions in them, and the expressions will be evaluated in
116116
the order they appear, with the resulting value of the body being the
@@ -123,15 +123,15 @@ <h2>Language: Glossary</h2>
123123
instance, instead of having multiple string objects with the same value
124124
of "clojure".</p><h3 id="keyword">keyword</h3><p>A Clojure scalar data type whose literal syntax looks <code>:like</code> <code>:this</code>.
125125
They are like numbers and strings in that they evaluate to themselves,
126-
and are most often seen being used as keys in <a href="#map">hash-maps</a>.</p><p>See also <a href="#namespaced_keyword">namespaced keyword</a></p><p>The term is also used when talking about functions that take "keyword
126+
and are most often seen being used as keys in <a href="#map">hash-maps</a>.</p><p>See also <a href="#namespaced-keyword">namespaced keyword</a></p><p>The term is also used when talking about functions that take "keyword
127127
arguments", for example, something like: <code>(my-func :speed 42 :mass 2)</code>
128128
(as opposed to <code>(my-func {:speed 42 :mass 2})</code>).</p><h3 id="lazy">lazy</h3><p>Clojure can (and often does) create sequences for you that aren't
129129
fully computed. Upon casual inspection they <em>look</em> just like a regular
130130
list, but particular values in them are only computed the moment you
131131
ask for them --- not sooner.</p><p>This has the added benefit that you can easily create infinite
132132
sequences that don't consume infinite memory.</p><p>Many of the built-in Clojure functions return lazy sequences.</p><p>See also <a href="#realize">realize</a>.</p><h3 id="let-binding">let-binding</h3><p>AKA, "binding vector", or just "bindings": in a <code>let</code> (and expressions
133133
that work like let, for example, <code>defn</code>, <code>loop</code>, <code>loop</code>, &amp; <code>fn</code>), the
134-
vector that comes first where you specify lexical bindings.</p><p>See also <a href="#binding_form">binding form</a></p><p><a name="libspec"></a></p><h3 id="libspec">libspec</h3><p>The docstring of <code>require</code> defines a libspec as:</p><blockquote><p>A libspec is a lib name or a vector containing a lib name followed by options expressed as sequential keywords and arguments.</p></blockquote><p>A lib name is in turn defined thus:</p><blockquote><p>Lib names are symbols and each lib is associated with a Clojure namespace and a Java package that share its name. A lib's name also locates its root directory within classpath using Java's package name to classpath-relative path mapping.</p></blockquote><p>Examples of libspecs:</p><pre><code class="clojure"> clojure.string
134+
vector that comes first where you specify lexical bindings.</p><p>See also <a href="#binding-form">binding form</a></p><p><a name="libspec"></a></p><h3 id="libspec">libspec</h3><p>The docstring of <code>require</code> defines a libspec as:</p><blockquote><p>A libspec is a lib name or a vector containing a lib name followed by options expressed as sequential keywords and arguments.</p></blockquote><p>A lib name is in turn defined thus:</p><blockquote><p>Lib names are symbols and each lib is associated with a Clojure namespace and a Java package that share its name. A lib's name also locates its root directory within classpath using Java's package name to classpath-relative path mapping.</p></blockquote><p>Examples of libspecs:</p><pre><code class="clojure"> clojure.string
135135
[clojure.string :as str]
136136
[clojure.string :refer [join split]]
137137
[clojure.string :as-alias s] ;; :as-alias is new in Clojure 1.11
@@ -231,7 +231,7 @@ <h2>Language: Glossary</h2>
231231
type erasure.</p><h3 id="value">value</h3><p>An immutable object, such as the number 1, the character <code>\a</code>, the
232232
string "hello", or the vector <code>[1 2 3]</code>. In Clojure, all scalars and
233233
built-in core data structures are values.</p><h3 id="variadic">variadic</h3><p>A function that can take a variable number of arguments.
234-
See also <a href="#rest_args">rest args</a>.</p>
234+
See also <a href="#rest-args">rest args</a>.</p>
235235

236236
<div id="prev-next">
237237

cryogen.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><atom:link href="https://clojure-doc.org/" rel="self" type="application/rss+xml"/><title>Clojure Guides</title><link>https://clojure-doc.org/</link><description>Clojure Documentation</description><lastBuildDate>Thu, 06 Mar 2025 22:10:13 -0800</lastBuildDate><generator>clj-rss</generator></channel></rss>
1+
<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><atom:link href="https://clojure-doc.org/" rel="self" type="application/rss+xml"/><title>Clojure Guides</title><link>https://clojure-doc.org/</link><description>Clojure Documentation</description><lastBuildDate>Sun, 23 Mar 2025 18:42:26 -0700</lastBuildDate><generator>clj-rss</generator></channel></rss>

feed.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><atom:link href="https://clojure-doc.org/" rel="self" type="application/rss+xml"/><title>Clojure Guides</title><link>https://clojure-doc.org/</link><description>Clojure Documentation</description><lastBuildDate>Thu, 06 Mar 2025 22:10:13 -0800</lastBuildDate><generator>clj-rss</generator></channel></rss>
1+
<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><atom:link href="https://clojure-doc.org/" rel="self" type="application/rss+xml"/><title>Clojure Guides</title><link>https://clojure-doc.org/</link><description>Clojure Documentation</description><lastBuildDate>Sun, 23 Mar 2025 18:42:26 -0700</lastBuildDate><generator>clj-rss</generator></channel></rss>

0 commit comments

Comments
 (0)