From 75a3214d5b04cbd3ca4ca1ce2f07d9ea0da952b1 Mon Sep 17 00:00:00 2001 From: Andrey Listopadov Date: Wed, 7 Sep 2022 22:50:27 +0300 Subject: update docs --- doc/core.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'doc/core.md') diff --git a/doc/core.md b/doc/core.md index fa3d678..7f13e9b 100644 --- a/doc/core.md +++ b/doc/core.md @@ -166,7 +166,8 @@ non-ASCII strings. - [`partition-all`](#partition-all) - [`partition-by`](#partition-by) - [`persistent!`](#persistent) -- [`pop!`](#pop) +- [`pop`](#pop) +- [`pop!`](#pop-1) - [`random-sample`](#random-sample) - [`realized?`](#realized) - [`reduced?`](#reduced-1) @@ -1721,6 +1722,18 @@ Returns a new, persistent version of the transient collection. The transient collection cannot be used after this call, any such use will raise an error. +## `pop` +Function signature: + +``` +(pop [coll]) +``` + +If `coll` is a list returns a new list without the first +item. If `coll` is a vector, returns a new vector without the last +item. If the collection is empty, raises an error. Not the same as +`next` or `butlast`. + ## `pop!` Function signature: -- cgit v1.2.3