Liking cljdoc? Tell your friends :D

std.pretty.deque


catvecclj

(catvec)
(catvec v1)
(catvec v1 v2)
(catvec v1 v2 v3)
(catvec v1 v2 v3 v4)
(catvec v1 v2 v3 v4 & vn)

Concatenates the given vectors in logarithmic time.

Concatenates the given vectors in logarithmic time.
raw docstring

conj-bothclj

(conj-both l deque r)

appends elements on either side

(conj-both 1 [2] 3) => [1 2 3]

appends elements on either side

(conj-both 1 [2] 3)
=> [1 2 3]
raw docstring

conj-leftclj

(conj-left v & more)

appends elements on the left

(conj-left [4] 3 2 1) => [1 2 3 4]

appends elements on the left

(conj-left [4] 3 2 1)
=> [1 2 3 4]
raw docstring

conj-rightclj

(conj-right v & more)

appends elements on the right

(conj-right [1] 2 3 4) => [1 2 3 4]

appends elements on the right

(conj-right [1] 2 3 4)
=> [1 2 3 4]
raw docstring

peekclj

(peek coll)

For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is empty, returns nil.

For a list or queue, same as first, for a vector, same as, but much
more efficient than, last. If the collection is empty, returns nil.
raw docstring

peek-leftclj

(peek-left v)

peeks at the first element on the left

(peek-left [1 2 3 4]) => 1

peeks at the first element on the left

(peek-left [1 2 3 4])
=> 1
raw docstring

popclj

(pop coll)

For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the last item. If the collection is empty, throws an exception. Note - not the same as next/butlast.

For a list or queue, returns a new list/queue without the first
item, for a vector, returns a new vector without the last item. If
the collection is empty, throws an exception.  Note - not the same
as next/butlast.
raw docstring

pop-leftclj

(pop-left v)

pops an element from the left

(pop-left [1 2 3 4]) => [2 3 4]

pops an element from the left

(pop-left [1 2 3 4])
=> [2 3 4]
raw docstring

update-leftclj

(update-left deque f & args)

updates the leftmost element

(update-left [1 2 3] dec) => [0 2 3]

updates the leftmost element

(update-left [1 2 3] dec)
=> [0 2 3]
raw docstring

update-rightclj

(update-right deque f & args)

updates the rightmost element

(update-right [1 2 3] inc) => [1 2 4]

updates the rightmost element

(update-right [1 2 3] inc)
=> [1 2 4]
raw docstring

vectorclj

(vector)
(vector a)
(vector a b)
(vector a b c)
(vector a b c d)
(vector a b c d e)
(vector a b c d e f)
(vector a b c d e f & args)

Creates a new vector containing the args.

Creates a new vector containing the args.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close