From 6971eedee776d0014c94cbee519655e37707a8f7 Mon Sep 17 00:00:00 2001 From: Andrey Listopadov Date: Wed, 30 Aug 2023 19:33:12 +0300 Subject: rename the lazy-seq function to lazy-seq* to avoid name clash with a macro --- doc/cljlib.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/cljlib.md b/doc/cljlib.md index b1678f5..d118652 100644 --- a/doc/cljlib.md +++ b/doc/cljlib.md @@ -154,6 +154,7 @@ Another difference is that Lua 5.2 and LuaJIT don't have an inbuilt UTF-8 librar - [`iterate`](#iterate) - [`keep`](#keep) - [`keep-indexed`](#keep-indexed) +- [`lazy-seq*`](#lazy-seq-1) - [`line-seq`](#line-seq) - [`list`](#list) - [`list*`](#list-1) @@ -2052,6 +2053,18 @@ the `coll`. Note, this means false return values will be included. `f` must be free of side effects. Returns a transducer when no collection is provided. +## `lazy-seq*` +Function signature: + +``` +(lazy-seq* [f]) +``` + +Create lazy sequence from the result of calling a function `f`. +Delays execution of `f` until sequence is consumed. `f` must return a +sequence or a vector. There's a convenience macro [`lazy-seq`](#lazy-seq) +automates the process of function creation. + ## `line-seq` Function signature: -- cgit v1.2.3