Skip to content

Commit 8db24c0

Browse files
authoredJun 12, 2020
Update primitives.html
1 parent c2d4196 commit 8db24c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎docs/xcsl/primitives.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ <h3><a class="anchor" aria-hidden="true" id="escaped-characters"></a><a href="#e
206206
<hr>
207207
<h2><a class="anchor" aria-hidden="true" id="containers"></a><a href="#containers" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Containers</h2>
208208
<h3><a class="anchor" aria-hidden="true" id="linked-lists"></a><a href="#linked-lists" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Linked Lists</h3>
209-
<p><strong>Linked Lists</strong> are the standard containers for collections of like-type data on XCS. They provide quick and easy ways to define and reference <em>lists</em> of numbers, letters, phrases, etc.</p>
209+
<p><strong>Linked Lists</strong> are the standard containers for collections of like-type data on XCS. They provide quick and easy ways to define and reference <em>lists</em> of numbers, letters, phrases, etc. Lists can contain any type and can be filled with different types, for example [1,2.74,"hello"] is a valid list with three different types.</p>
210210
<p>See below as an example, a constructed list of integers:</p>
211211
<pre><code class="hljs css language-haskell"><span class="hljs-number">1</span> :: [<span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>, <span class="hljs-number">5</span>]
212212
<span class="hljs-comment">>[1,2,3,4,5]</span>
@@ -228,7 +228,7 @@ <h4><a class="anchor" aria-hidden="true" id="concatenation"></a><a href="#concat
228228
<span class="hljs-comment">>"Hello User!"</span>
229229
</code></pre>
230230
<h4><a class="anchor" aria-hidden="true" id="length"></a><a href="#length" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Length</h4>
231-
<p>You can determine the (integer) length of a list using <code>len</code>, as such:</p>
231+
<p>You can determine the (integer) length of a list using <code>len</code>, this built in function will return the size of the list as such:</p>
232232
<pre><code class="hljs css language-haskell"><span class="hljs-title">len</span> [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>] <span class="hljs-comment">-- Would return: 3</span>
233233
<span class="hljs-comment">>3</span>
234234
</code></pre>

0 commit comments

Comments
 (0)
Failed to load comments.