Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lists concept #689

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion concepts/lists/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"blurb": "Lists are immutable, sequential collections representing function calls unless quoted.",
"authors": ["porkostomus", "bemself", "cstby"]
"authors": [
"porkostomus",
"bemself",
"cstby"
],
"contributors": [
"tasxatzial"
]
}
21 changes: 10 additions & 11 deletions concepts/lists/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
## Key Learnings

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

## Additional Resources

- [list - clojure.core | ClojureDocs](https://clojuredocs.org/clojure.core/list)
- [Data Structures](https://clojure.org/reference/data_structures)
- [Lists in Clojurescript](https://cljs.github.io/api/syntax/list)
[list]: https://clojuredocs.org/clojure.core/list
[first]: https://clojuredocs.org/clojure.core/first
[rest]: https://clojuredocs.org/clojure.core/rest
[count]: https://clojuredocs.org/clojure.core/count
[conj]: https://clojuredocs.org/clojure.core/conj
8 changes: 0 additions & 8 deletions concepts/lists/links.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
[
{
"url": "https://clojuredocs.org/clojure.core/list",
"description": "list - clojure.core | ClojureDocs"
},
{
"url": "https://clojure.org/reference/data_structures",
"description": "Data Structures"
},
{
"url": "https://cljs.github.io/api/syntax/list",
"description": "Lists in Clojurescript"
}
]
Loading