Functions for working with lists.
Functions for working with lists.
(add-first xs x)Adds an entry at the front of the list.
Adds an entry at the front of the list.
(add-last xs x)Adds an entry at the end of the list.
Adds an entry at the end of the list.
(concat-all lists)Concatenates a collection of lists.
Concatenates a collection of lists.
(from-array xs)Like (from xs), constructs a list from an array. Extending protocols over
array subtypes is... maybe impossible.
Like `(from xs)`, constructs a list from an array. Extending protocols over array subtypes is... maybe impossible.
(list)(list & args)Constructs a new list. With arguments, constructs a list of those arguments.
Constructs a new list. With arguments, constructs a list of those arguments.
(remove-first xs)Removes the entry at the start of the list, or returns the same list if empty.
Removes the entry at the start of the list, or returns the same list if empty.
(remove-last xs)Removes the entry at the end of the list, or returns the same list if empty.
Removes the entry at the end of the list, or returns the same list if empty.
(set xs n x)Returns a new list, with the element at idx overwritten with value. If idx is equal to ICollection.size(), the value is appended.
Returns a new list, with the element at idx overwritten with value. If idx is equal to ICollection.size(), the value is appended.
(slice xs start end)Takes a sub-range of the given list from start (inclusive) to end (exclusive). Linear if this list is linear.
Takes a sub-range of the given list from start (inclusive) to end (exclusive). Linear if this list is linear.
(sort xs)(sort xs comparator)Sorts a list, optionally with a comparator.
Sorts a list, optionally with a comparator.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |