File tree 3 files changed +18
-20
lines changed
3 files changed +18
-20
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"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
+ ]
4
11
}
Original file line number Diff line number Diff line change 3
3
## Key Learnings
4
4
5
5
- 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.
7
7
- Clojure will try to evaluate lists, treating the first item as a function.
8
8
- 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.
14
13
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
Original file line number Diff line number Diff line change 1
1
[
2
- {
3
- "url" : " https://clojuredocs.org/clojure.core/list" ,
4
- "description" : " list - clojure.core | ClojureDocs"
5
- },
6
2
{
7
3
"url" : " https://clojure.org/reference/data_structures" ,
8
4
"description" : " Data Structures"
9
- },
10
- {
11
- "url" : " https://cljs.github.io/api/syntax/list" ,
12
- "description" : " Lists in Clojurescript"
13
5
}
14
6
]
You can’t perform that action at this time.
0 commit comments