@@ -206,7 +206,7 @@ <h3><a class="anchor" aria-hidden="true" id="escaped-characters"></a><a href="#e
206
206
< hr >
207
207
< 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 >
208
208
< 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 >
210
210
< p > See below as an example, a constructed list of integers:</ p >
211
211
< 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 > ]
212
212
< 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
228
228
< span class ="hljs-comment "> > "Hello User!"</ span >
229
229
</ code > </ pre >
230
230
< 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 >
232
232
< 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 >
233
233
< span class ="hljs-comment "> > 3</ span >
234
234
</ code > </ pre >
0 commit comments