Skip to content

Commit 240eccc

Browse files
authored
Update lists concept (#689)
* lists concept: Correct terminology * update config * add links for all functions * correct terminology for the 'rest' function * update links.json * revert rest definition * remove sequences link as it's no longer needed
1 parent a5486a7 commit 240eccc

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

concepts/lists/.meta/config.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
22
"blurb": "Lists are immutable, sequential collections representing function calls unless quoted.",
3-
"authors": ["porkostomus", "bemself", "cstby"]
3+
"authors": [
4+
"porkostomus",
5+
"bemself",
6+
"cstby"
7+
],
8+
"contributors": [
9+
"tasxatzial"
10+
]
411
}

concepts/lists/about.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
## Key Learnings
44

55
- Lists are collections.
6-
- Lists can be created using `list` or by using a single quote.
6+
- Lists can be created using [`list`][list] or by using a single quote.
77
- Clojure will try to evaluate lists, treating the first item as a function.
88
- Core functions:
9-
- `cons` returns a list with the new item added to beginning.
10-
- `first` returns the first item from a list.
11-
- `rest` returns the list without the first item.
12-
- `count` returns the number of items in the list.
13-
- `conj` returns a list with items appended in it.
9+
- [`first`][first] returns the first item in the list.
10+
- [`rest`][rest] returns a list of all items of the list except the first.
11+
- [`count`][count] returns the number of items in the list.
12+
- [`conj`][conj] adds one or more items to the beginning of the list.
1413

15-
## Additional Resources
16-
17-
- [list - clojure.core | ClojureDocs](https://clojuredocs.org/clojure.core/list)
18-
- [Data Structures](https://clojure.org/reference/data_structures)
19-
- [Lists in Clojurescript](https://cljs.github.io/api/syntax/list)
14+
[list]: https://clojuredocs.org/clojure.core/list
15+
[first]: https://clojuredocs.org/clojure.core/first
16+
[rest]: https://clojuredocs.org/clojure.core/rest
17+
[count]: https://clojuredocs.org/clojure.core/count
18+
[conj]: https://clojuredocs.org/clojure.core/conj

concepts/lists/links.json

-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
[
2-
{
3-
"url": "https://clojuredocs.org/clojure.core/list",
4-
"description": "list - clojure.core | ClojureDocs"
5-
},
62
{
73
"url": "https://clojure.org/reference/data_structures",
84
"description": "Data Structures"
9-
},
10-
{
11-
"url": "https://cljs.github.io/api/syntax/list",
12-
"description": "Lists in Clojurescript"
135
}
146
]

0 commit comments

Comments
 (0)