Liking cljdoc? Tell your friends :D

utilis.coll


insert-atclj/s

(insert-at coll index item)

Inserts item into the coll at index. Items already in coll after index are shifted forward to accommodate item.

It is the responsibility of the caller to ensure that the index is within bounds.

Inserts `item` into the `coll` at `index`. Items already in `coll` after
`index` are shifted forward to accommodate `item`.

It is the responsibility of the caller to ensure that the index is within
bounds.
sourceraw docstring

onlyclj/s

(only s)
(only s exception-message)

Returns the first element from s iff it's the only element in s. If s does not contain exactly 1 element, an IllegalAgumentException or js/Error is thrown. The message for the exceptions can be optionally specified.

Returns the first element from `s` iff it's the only element in `s`.
If `s` does not contain exactly 1 element, an IllegalAgumentException
or js/Error is thrown. The message for the exceptions can be optionally
specified.
sourceraw docstring

remove-atclj/s

(remove-at coll index)

Removed the item at index from coll. Subsequent items are shifted to ensure that there are no gaps in the collection.

It is the responsibility of the caller to ensure that the index is within bounds.

Removed the item at `index` from `coll`. Subsequent items are shifted
to ensure that there are no gaps in the collection.

It is the responsibility of the caller to ensure that the index is within
bounds.
sourceraw docstring

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

× close