Restore some newlines in docstrings

* dash.el (-each, -each-indexed, -each-while, -each-r)
(-each-r-while, -dotimes, -map, -reduce-from, -reduce)
(-reduce-r-from, -reduce-r, -reductions-from, -reductions)
(-reductions-r-from, -reductions-r, -filter, -remove, -remove-first)
(-remove-last, -keep, -map-indexed, -first, -some, -take-while)
(-drop-while, -drop, -cons-pair?): Restore some sectioning newlines
in docstrings for the benefit of README.md.
(--map): Remove unnecessary newline.

* README.md:
* dash.texi: Regenerate docs.
master
Basil L. Contovounesios 5 years ago
parent 3fa27c484c
commit 7048e6881f
No known key found for this signature in database
GPG Key ID: 205AB54A5D5D8CFF
  1. 49
      README.md
  2. 50
      dash.el
  3. 49
      dash.texi

@ -368,6 +368,7 @@ new list.
#### -map `(fn list)`
Apply `fn` to each item in `list` and return the list of results.
This function's anaphoric counterpart is `--map`.
```el
@ -423,6 +424,7 @@ This is like [`-map`](#-map-fn-list), but `fn` takes two arguments: the index of
current element within `list`, and the element itself.
This function's anaphoric counterpart is `--map-indexed`.
For a side-effecting variant, see also [`-each-indexed`](#-each-indexed-list-fn).
```el
@ -499,8 +501,11 @@ Functions returning a sublist of the original list.
#### -filter `(pred list)`
Return a new list of the items in `list` for which `pred` returns non-nil.
Alias: `-select`.
This function's anaphoric counterpart is `--filter`.
For similar operations, see also [`-keep`](#-keep-fn-list) and [`-remove`](#-remove-pred-list).
```el
@ -512,8 +517,11 @@ For similar operations, see also [`-keep`](#-keep-fn-list) and [`-remove`](#-rem
#### -remove `(pred list)`
Return a new list of the items in `list` for which `pred` returns nil.
Alias: `-reject`.
This function's anaphoric counterpart is `--remove`.
For similar operations, see also [`-keep`](#-keep-fn-list) and [`-filter`](#-filter-pred-list).
```el
@ -529,8 +537,11 @@ This is a non-destructive operation, but only the front of `list`
leading up to the removed item is a copy; the rest is `list`'s
original tail. If no item is removed, then the result is a
complete copy.
Alias: `-reject-first`.
This function's anaphoric counterpart is `--remove-first`.
See also [`-map-first`](#-map-first-pred-rep-list), [`-remove-item`](#-remove-item-item-list), and [`-remove-last`](#-remove-last-pred-list).
```el
@ -544,8 +555,11 @@ See also [`-map-first`](#-map-first-pred-rep-list), [`-remove-item`](#-remove-it
Remove the last item from `list` for which `pred` returns non-nil.
The result is a copy of `list` regardless of whether an element is
removed.
Alias: `-reject-last`.
This function's anaphoric counterpart is `--remove-last`.
See also [`-map-last`](#-map-last-pred-rep-list), [`-remove-item`](#-remove-item-item-list), and [`-remove-first`](#-remove-first-pred-list).
```el
@ -624,6 +638,7 @@ See also: [`-take`](#-take-n-list).
Return the tail (not a copy) of `list` without the first `n` items.
Return nil if `list` contains `n` items or fewer.
Return `list` if `n` is zero or less.
For another variant, see also [`-drop-last`](#-drop-last-n-list).
```el
@ -652,7 +667,9 @@ Take successive items from `list` for which `pred` returns non-nil.
`pred` is a function of one argument. Return a new list of the
successive elements from the start of `list` for which `pred` returns
non-nil.
This function's anaphoric counterpart is `--take-while`.
For another variant, see also [`-drop-while`](#-drop-while-pred-list).
```el
@ -667,7 +684,9 @@ Drop successive items from `list` for which `pred` returns non-nil.
`pred` is a function of one argument. Return the tail (not a copy)
of `list` starting from its first element for which `pred` returns
nil.
This function's anaphoric counterpart is `--drop-while`.
For another variant, see also [`-take-while`](#-take-while-pred-list).
```el
@ -729,6 +748,7 @@ Functions returning a modified copy of the input list.
Return a new list of the non-nil results of applying `fn` to each item in `list`.
Like [`-filter`](#-filter-pred-list), but returns the non-nil results of `fn` instead of
the corresponding elements of `list`.
Its anaphoric counterpart is `--keep`.
```el
@ -894,6 +914,7 @@ Return the result of applying `fn` to `init` and the first element of
etc. If `list` is empty, return `init` without calling `fn`.
This function's anaphoric counterpart is `--reduce-from`.
For other folds, see also [`-reduce`](#-reduce-fn-list) and [`-reduce-r`](#-reduce-r-fn-list).
```el
@ -918,6 +939,7 @@ is like replacing the conses in `list` with applications of `fn`, and
its last link with `init`, and evaluating the resulting expression.
This function's anaphoric counterpart is `--reduce-r-from`.
For other folds, see also [`-reduce-r`](#-reduce-r-fn-list) and [`-reduce`](#-reduce-fn-list).
```el
@ -936,6 +958,7 @@ If `list` is empty, return the result of calling `fn` with no
arguments.
This function's anaphoric counterpart is `--reduce`.
For other folds, see also [`-reduce-from`](#-reduce-from-fn-init-list) and [`-reduce-r`](#-reduce-r-fn-list).
```el
@ -962,6 +985,7 @@ like replacing the conses in `list` with applications of `fn`,
ignoring its last link, and evaluating the resulting expression.
This function's anaphoric counterpart is `--reduce-r`.
For other folds, see also [`-reduce-r-from`](#-reduce-r-from-fn-init-list) and [`-reduce`](#-reduce-fn-list).
```el
@ -976,7 +1000,9 @@ Return a list of `fn`'s intermediate reductions across `list`.
That is, a list of the intermediate values of the accumulator
when [`-reduce-from`](#-reduce-from-fn-init-list) (which see) is called with the same
arguments.
This function's anaphoric counterpart is `--reductions-from`.
For other folds, see also [`-reductions`](#-reductions-fn-list) and [`-reductions-r`](#-reductions-r-fn-list).
```el
@ -991,7 +1017,9 @@ Return a list of `fn`'s intermediate reductions across reversed `list`.
That is, a list of the intermediate values of the accumulator
when [`-reduce-r-from`](#-reduce-r-from-fn-init-list) (which see) is called with the same
arguments.
This function's anaphoric counterpart is `--reductions-r-from`.
For other folds, see also [`-reductions`](#-reductions-fn-list) and [`-reductions-r`](#-reductions-r-fn-list).
```el
@ -1005,7 +1033,9 @@ For other folds, see also [`-reductions`](#-reductions-fn-list) and [`-reduction
Return a list of `fn`'s intermediate reductions across `list`.
That is, a list of the intermediate values of the accumulator
when [`-reduce`](#-reduce-fn-list) (which see) is called with the same arguments.
This function's anaphoric counterpart is `--reductions`.
For other folds, see also [`-reductions`](#-reductions-fn-list) and [`-reductions-r`](#-reductions-r-fn-list).
```el
@ -1019,7 +1049,9 @@ For other folds, see also [`-reductions`](#-reductions-fn-list) and [`-reduction
Return a list of `fn`'s intermediate reductions across reversed `list`.
That is, a list of the intermediate values of the accumulator
when [`-reduce-r`](#-reduce-r-fn-list) (which see) is called with the same arguments.
This function's anaphoric counterpart is `--reductions-r`.
For other folds, see also [`-reductions-r-from`](#-reductions-r-from-fn-init-list) and
[`-reductions`](#-reductions-fn-list).
@ -1329,6 +1361,7 @@ Alias: `-is-infix-p`
Return non-nil if `obj` is a true cons pair.
That is, a cons (`a` . `b`) where `b` is not a list.
Alias: `-cons-pair-p`.
```el
@ -1936,7 +1969,9 @@ See also: [`-flatten-n`](#-flatten-n-num-list), [`-table`](#-table-fn-rest-lists
Return the first item in `list` for which `pred` returns non-nil.
Return nil if no such element is found.
To get the first item in the list no questions asked, use `car`.
Alias: `-find`.
This function's anaphoric counterpart is `--first`.
```el
@ -1948,7 +1983,9 @@ This function's anaphoric counterpart is `--first`.
#### -some `(pred list)`
Return (`pred` x) for the first `list` item where (`pred` x) is non-nil, else nil.
Alias: `-any`.
This function's anaphoric counterpart is `--some`.
```el
@ -2617,8 +2654,11 @@ Functions iterating over lists for side effect only.
Call `fn` on each element of `list`.
Return nil; this function is intended for side effects.
Its anaphoric counterpart is `--each`. For access to the current
element's index in `list`, see [`-each-indexed`](#-each-indexed-list-fn).
Its anaphoric counterpart is `--each`.
For access to the current element's index in `list`, see
[`-each-indexed`](#-each-indexed-list-fn).
```el
(let (l) (-each '(1 2 3) (lambda (x) (push x l))) l) ;; => '(3 2 1)
@ -2632,6 +2672,7 @@ Call `fn` on each `item` in `list`, while (`pred` `item`) is non-nil.
Once an `item` is reached for which `pred` returns nil, `fn` is no
longer called. Return nil; this function is intended for side
effects.
Its anaphoric counterpart is `--each-while`.
```el
@ -2645,6 +2686,7 @@ Its anaphoric counterpart is `--each-while`.
Call `fn` on each index and element of `list`.
For each `item` at `index` in `list`, call (funcall `fn` `index` `item`).
Return nil; this function is intended for side effects.
See also: [`-map-indexed`](#-map-indexed-fn-list).
```el
@ -2657,6 +2699,7 @@ See also: [`-map-indexed`](#-map-indexed-fn-list).
Call `fn` on each element of `list` in reversed order.
Return nil; this function is intended for side effects.
Its anaphoric counterpart is `--each-r`.
```el
@ -2671,6 +2714,7 @@ Call `fn` on each `item` in reversed `list`, while (`pred` `item`) is non-nil.
Once an `item` is reached for which `pred` returns nil, `fn` is no
longer called. Return nil; this function is intended for side
effects.
Its anaphoric counterpart is `--each-r-while`.
```el
@ -2685,6 +2729,7 @@ Call `fn` `num` times, presumably for side effects.
`fn` is called with a single argument on successive integers
running from 0, inclusive, to `num`, exclusive. `fn` is not called
if `num` is less than 1.
This function's anaphoric counterpart is `--dotimes`.
```el

@ -68,8 +68,11 @@ This is the anaphoric counterpart to `-each'."
(defun -each (list fn)
"Call FN on each element of LIST.
Return nil; this function is intended for side effects.
Its anaphoric counterpart is `--each'. For access to the current
element's index in LIST, see `-each-indexed'."
Its anaphoric counterpart is `--each'.
For access to the current element's index in LIST, see
`-each-indexed'."
(declare (indent 1))
(ignore (mapc fn list)))
@ -79,6 +82,7 @@ element's index in LIST, see `-each-indexed'."
"Call FN on each index and element of LIST.
For each ITEM at INDEX in LIST, call (funcall FN INDEX ITEM).
Return nil; this function is intended for side effects.
See also: `-map-indexed'."
(declare (indent 1))
(--each list (funcall fn it-index it)))
@ -107,6 +111,7 @@ This is the anaphoric counterpart to `-each-while'."
Once an ITEM is reached for which PRED returns nil, FN is no
longer called. Return nil; this function is intended for side
effects.
Its anaphoric counterpart is `--each-while'."
(declare (indent 2))
(--each-while list (funcall pred it) (funcall fn it)))
@ -136,6 +141,7 @@ This is the anaphoric counterpart to `-each-r'."
(defun -each-r (list fn)
"Call FN on each element of LIST in reversed order.
Return nil; this function is intended for side effects.
Its anaphoric counterpart is `--each-r'."
(--each-r list (funcall fn it)))
@ -167,6 +173,7 @@ This is the anaphoric counterpart to `-each-r-while'."
Once an ITEM is reached for which PRED returns nil, FN is no
longer called. Return nil; this function is intended for side
effects.
Its anaphoric counterpart is `--each-r-while'."
(--each-r-while list (funcall pred it) (funcall fn it)))
@ -192,12 +199,14 @@ This is the anaphoric counterpart to `-dotimes'."
FN is called with a single argument on successive integers
running from 0, inclusive, to NUM, exclusive. FN is not called
if NUM is less than 1.
This function's anaphoric counterpart is `--dotimes'."
(declare (indent 1))
(--dotimes num (funcall fn it)))
(defun -map (fn list)
"Apply FN to each item in LIST and return the list of results.
This function's anaphoric counterpart is `--map'."
(mapcar fn list))
@ -205,7 +214,6 @@ This function's anaphoric counterpart is `--map'."
"Eval FORM for each item in LIST and return the list of results.
Each element of LIST in turn is bound to `it' before evaluating
FORM.
This is the anaphoric counterpart to `-map'."
(declare (debug (def-form form)))
`(mapcar (lambda (it) (ignore it) ,form) ,list))
@ -233,6 +241,7 @@ LIST, then applying FN to that result and the second element,
etc. If LIST is empty, return INIT without calling FN.
This function's anaphoric counterpart is `--reduce-from'.
For other folds, see also `-reduce' and `-reduce-r'."
(--reduce-from (funcall fn acc it) init list))
@ -261,6 +270,7 @@ If LIST is empty, return the result of calling FN with no
arguments.
This function's anaphoric counterpart is `--reduce'.
For other folds, see also `-reduce-from' and `-reduce-r'."
(if list
(-reduce-from fn (car list) (cdr list))
@ -291,6 +301,7 @@ is like replacing the conses in LIST with applications of FN, and
its last link with INIT, and evaluating the resulting expression.
This function's anaphoric counterpart is `--reduce-r-from'.
For other folds, see also `-reduce-r' and `-reduce'."
(--reduce-r-from (funcall fn it acc) init list))
@ -319,6 +330,7 @@ like replacing the conses in LIST with applications of FN,
ignoring its last link, and evaluating the resulting expression.
This function's anaphoric counterpart is `--reduce-r'.
For other folds, see also `-reduce-r-from' and `-reduce'."
(if list
(--reduce-r (funcall fn it acc) list)
@ -341,7 +353,9 @@ This is the anaphoric counterpart to `-reductions-from'."
That is, a list of the intermediate values of the accumulator
when `-reduce-from' (which see) is called with the same
arguments.
This function's anaphoric counterpart is `--reductions-from'.
For other folds, see also `-reductions' and `-reductions-r'."
(--reductions-from (funcall fn acc it) init list))
@ -363,7 +377,9 @@ This is the anaphoric counterpart to `-reductions'."
"Return a list of FN's intermediate reductions across LIST.
That is, a list of the intermediate values of the accumulator
when `-reduce' (which see) is called with the same arguments.
This function's anaphoric counterpart is `--reductions'.
For other folds, see also `-reductions' and `-reductions-r'."
(if list
(--reductions-from (funcall fn acc it) (car list) (cdr list))
@ -385,7 +401,9 @@ This is the anaphoric counterpart to `-reductions-r-from'."
That is, a list of the intermediate values of the accumulator
when `-reduce-r-from' (which see) is called with the same
arguments.
This function's anaphoric counterpart is `--reductions-r-from'.
For other folds, see also `-reductions' and `-reductions-r'."
(--reductions-r-from (funcall fn it acc) init list))
@ -409,7 +427,9 @@ This is the anaphoric counterpart to `-reductions-r'."
"Return a list of FN's intermediate reductions across reversed LIST.
That is, a list of the intermediate values of the accumulator
when `-reduce-r' (which see) is called with the same arguments.
This function's anaphoric counterpart is `--reductions-r'.
For other folds, see also `-reductions-r-from' and
`-reductions'."
(if list
@ -430,8 +450,11 @@ For the opposite operation, see also `--remove'."
(defun -filter (pred list)
"Return a new list of the items in LIST for which PRED returns non-nil.
Alias: `-select'.
This function's anaphoric counterpart is `--filter'.
For similar operations, see also `-keep' and `-remove'."
(--filter (funcall pred it) list))
@ -449,8 +472,11 @@ For the opposite operation, see also `--filter'."
(defun -remove (pred list)
"Return a new list of the items in LIST for which PRED returns nil.
Alias: `-reject'.
This function's anaphoric counterpart is `--remove'.
For similar operations, see also `-keep' and `-filter'."
(--remove (funcall pred it) list))
@ -481,8 +507,11 @@ This is a non-destructive operation, but only the front of LIST
leading up to the removed item is a copy; the rest is LIST's
original tail. If no item is removed, then the result is a
complete copy.
Alias: `-reject-first'.
This function's anaphoric counterpart is `--remove-first'.
See also `-map-first', `-remove-item', and `-remove-last'."
(--remove-first (funcall pred it) list))
@ -502,8 +531,11 @@ This is the anaphoric counterpart to `-remove-last'."
"Remove the last item from LIST for which PRED returns non-nil.
The result is a copy of LIST regardless of whether an element is
removed.
Alias: `-reject-last'.
This function's anaphoric counterpart is `--remove-last'.
See also `-map-last', `-remove-item', and `-remove-first'."
(--remove-last (funcall pred it) list))
@ -533,6 +565,7 @@ This is the anaphoric counterpart to `-keep'."
"Return a new list of the non-nil results of applying FN to each item in LIST.
Like `-filter', but returns the non-nil results of FN instead of
the corresponding elements of LIST.
Its anaphoric counterpart is `--keep'."
(--keep (funcall fn it) list))
@ -561,6 +594,7 @@ This is like `-map', but FN takes two arguments: the index of the
current element within LIST, and the element itself.
This function's anaphoric counterpart is `--map-indexed'.
For a side-effecting variant, see also `-each-indexed'."
(--map-indexed (funcall fn it-index it) list))
@ -773,7 +807,9 @@ This is the anaphoric counterpart to `-first'."
"Return the first item in LIST for which PRED returns non-nil.
Return nil if no such element is found.
To get the first item in the list no questions asked, use `car'.
Alias: `-find'.
This function's anaphoric counterpart is `--first'."
(--first (funcall pred it) list))
@ -794,7 +830,9 @@ This is the anaphoric counterpart to `-some'."
(defun -some (pred list)
"Return (PRED x) for the first LIST item where (PRED x) is non-nil, else nil.
Alias: `-any'.
This function's anaphoric counterpart is `--some'."
(--some (funcall pred it) list))
@ -1011,7 +1049,9 @@ This is the anaphoric counterpart to `-take-while'."
PRED is a function of one argument. Return a new list of the
successive elements from the start of LIST for which PRED returns
non-nil.
This function's anaphoric counterpart is `--take-while'.
For another variant, see also `-drop-while'."
(--take-while (funcall pred it) list))
@ -1033,7 +1073,9 @@ This is the anaphoric counterpart to `-drop-while'."
PRED is a function of one argument. Return the tail (not a copy)
of LIST starting from its first element for which PRED returns
nil.
This function's anaphoric counterpart is `--drop-while'.
For another variant, see also `-take-while'."
(--drop-while (funcall pred it) list))
@ -1059,6 +1101,7 @@ See also: `-take'."
"Return the tail (not a copy) of LIST without the first N items.
Return nil if LIST contains N items or fewer.
Return LIST if N is zero or less.
For another variant, see also `-drop-last'.
\n(fn N LIST)")
@ -2787,6 +2830,7 @@ the new seed."
(defun -cons-pair? (obj)
"Return non-nil if OBJ is a true cons pair.
That is, a cons (A . B) where B is not a list.
Alias: `-cons-pair-p'."
(declare (pure t) (side-effect-free t))
(nlistp (cdr-safe obj)))

@ -249,6 +249,7 @@ new list.
@anchor{-map}
@defun -map (fn list)
Apply @var{fn} to each item in @var{list} and return the list of results.
This function's anaphoric counterpart is @code{--map}.
@example
@ -344,6 +345,7 @@ This is like @code{-map} (@pxref{-map}), but @var{fn} takes two arguments: the i
current element within @var{list}, and the element itself.
This function's anaphoric counterpart is @code{--map-indexed}.
For a side-effecting variant, see also @code{-each-indexed} (@pxref{-each-indexed}).
@example
@ -478,8 +480,11 @@ Functions returning a sublist of the original list.
@anchor{-filter}
@defun -filter (pred list)
Return a new list of the items in @var{list} for which @var{pred} returns non-nil.
Alias: @code{-select}.
This function's anaphoric counterpart is @code{--filter}.
For similar operations, see also @code{-keep} (@pxref{-keep}) and @code{-remove} (@pxref{-remove}).
@example
@ -501,8 +506,11 @@ For similar operations, see also @code{-keep} (@pxref{-keep}) and @code{-remove}
@anchor{-remove}
@defun -remove (pred list)
Return a new list of the items in @var{list} for which @var{pred} returns nil.
Alias: @code{-reject}.
This function's anaphoric counterpart is @code{--remove}.
For similar operations, see also @code{-keep} (@pxref{-keep}) and @code{-filter} (@pxref{-filter}).
@example
@ -528,8 +536,11 @@ This is a non-destructive operation, but only the front of @var{list}
leading up to the removed item is a copy; the rest is @var{list}'s
original tail. If no item is removed, then the result is a
complete copy.
Alias: @code{-reject-first}.
This function's anaphoric counterpart is @code{--remove-first}.
See also @code{-map-first} (@pxref{-map-first}), @code{-remove-item} (@pxref{-remove-item}), and @code{-remove-last} (@pxref{-remove-last}).
@example
@ -553,8 +564,11 @@ See also @code{-map-first} (@pxref{-map-first}), @code{-remove-item} (@pxref{-re
Remove the last item from @var{list} for which @var{pred} returns non-nil.
The result is a copy of @var{list} regardless of whether an element is
removed.
Alias: @code{-reject-last}.
This function's anaphoric counterpart is @code{--remove-last}.
See also @code{-map-last} (@pxref{-map-last}), @code{-remove-item} (@pxref{-remove-item}), and @code{-remove-first} (@pxref{-remove-first}).
@example
@ -693,6 +707,7 @@ See also: @code{-take} (@pxref{-take}).
Return the tail (not a copy) of @var{list} without the first @var{n} items.
Return nil if @var{list} contains @var{n} items or fewer.
Return @var{list} if @var{n} is zero or less.
For another variant, see also @code{-drop-last} (@pxref{-drop-last}).
@example
@ -741,7 +756,9 @@ Take successive items from @var{list} for which @var{pred} returns non-nil.
@var{pred} is a function of one argument. Return a new list of the
successive elements from the start of @var{list} for which @var{pred} returns
non-nil.
This function's anaphoric counterpart is @code{--take-while}.
For another variant, see also @code{-drop-while} (@pxref{-drop-while}).
@example
@ -766,7 +783,9 @@ Drop successive items from @var{list} for which @var{pred} returns non-nil.
@var{pred} is a function of one argument. Return the tail (not a copy)
of @var{list} starting from its first element for which @var{pred} returns
nil.
This function's anaphoric counterpart is @code{--drop-while}.
For another variant, see also @code{-take-while} (@pxref{-take-while}).
@example
@ -863,6 +882,7 @@ Functions returning a modified copy of the input list.
Return a new list of the non-nil results of applying @var{fn} to each item in @var{list}.
Like @code{-filter} (@pxref{-filter}), but returns the non-nil results of @var{fn} instead of
the corresponding elements of @var{list}.
Its anaphoric counterpart is @code{--keep}.
@example
@ -1146,6 +1166,7 @@ Return the result of applying @var{fn} to @var{init} and the first element of
etc. If @var{list} is empty, return @var{init} without calling @var{fn}.
This function's anaphoric counterpart is @code{--reduce-from}.
For other folds, see also @code{-reduce} (@pxref{-reduce}) and @code{-reduce-r} (@pxref{-reduce-r}).
@example
@ -1180,6 +1201,7 @@ is like replacing the conses in @var{list} with applications of @var{fn}, and
its last link with @var{init}, and evaluating the resulting expression.
This function's anaphoric counterpart is @code{--reduce-r-from}.
For other folds, see also @code{-reduce-r} (@pxref{-reduce-r}) and @code{-reduce} (@pxref{-reduce}).
@example
@ -1208,6 +1230,7 @@ If @var{list} is empty, return the result of calling @var{fn} with no
arguments.
This function's anaphoric counterpart is @code{--reduce}.
For other folds, see also @code{-reduce-from} (@pxref{-reduce-from}) and @code{-reduce-r} (@pxref{-reduce-r}).
@example
@ -1244,6 +1267,7 @@ like replacing the conses in @var{list} with applications of @var{fn},
ignoring its last link, and evaluating the resulting expression.
This function's anaphoric counterpart is @code{--reduce-r}.
For other folds, see also @code{-reduce-r-from} (@pxref{-reduce-r-from}) and @code{-reduce} (@pxref{-reduce}).
@example
@ -1268,7 +1292,9 @@ Return a list of @var{fn}'s intermediate reductions across @var{list}.
That is, a list of the intermediate values of the accumulator
when @code{-reduce-from} (@pxref{-reduce-from}) (which see) is called with the same
arguments.
This function's anaphoric counterpart is @code{--reductions-from}.
For other folds, see also @code{-reductions} (@pxref{-reductions}) and @code{-reductions-r} (@pxref{-reductions-r}).
@example
@ -1293,7 +1319,9 @@ Return a list of @var{fn}'s intermediate reductions across reversed @var{list}.
That is, a list of the intermediate values of the accumulator
when @code{-reduce-r-from} (@pxref{-reduce-r-from}) (which see) is called with the same
arguments.
This function's anaphoric counterpart is @code{--reductions-r-from}.
For other folds, see also @code{-reductions} (@pxref{-reductions}) and @code{-reductions-r} (@pxref{-reductions-r}).
@example
@ -1317,7 +1345,9 @@ For other folds, see also @code{-reductions} (@pxref{-reductions}) and @code{-re
Return a list of @var{fn}'s intermediate reductions across @var{list}.
That is, a list of the intermediate values of the accumulator
when @code{-reduce} (@pxref{-reduce}) (which see) is called with the same arguments.
This function's anaphoric counterpart is @code{--reductions}.
For other folds, see also @code{-reductions} (@pxref{-reductions}) and @code{-reductions-r} (@pxref{-reductions-r}).
@example
@ -1341,7 +1371,9 @@ For other folds, see also @code{-reductions} (@pxref{-reductions}) and @code{-re
Return a list of @var{fn}'s intermediate reductions across reversed @var{list}.
That is, a list of the intermediate values of the accumulator
when @code{-reduce-r} (@pxref{-reduce-r}) (which see) is called with the same arguments.
This function's anaphoric counterpart is @code{--reductions-r}.
For other folds, see also @code{-reductions-r-from} (@pxref{-reductions-r-from}) and
@code{-reductions} (@pxref{-reductions}).
@ -1900,6 +1932,7 @@ Alias: @code{-is-infix-p}
@defun -cons-pair? (obj)
Return non-nil if @var{obj} is a true cons pair.
That is, a cons (@var{a} . @var{b}) where @var{b} is not a list.
Alias: @code{-cons-pair-p}.
@example
@ -2956,7 +2989,9 @@ See also: @code{-flatten-n} (@pxref{-flatten-n}), @code{-table} (@pxref{-table})
Return the first item in @var{list} for which @var{pred} returns non-nil.
Return nil if no such element is found.
To get the first item in the list no questions asked, use @code{car}.
Alias: @code{-find}.
This function's anaphoric counterpart is @code{--first}.
@example
@ -2978,7 +3013,9 @@ This function's anaphoric counterpart is @code{--first}.
@anchor{-some}
@defun -some (pred list)
Return (@var{pred} x) for the first @var{list} item where (@var{pred} x) is non-nil, else nil.
Alias: @code{-any}.
This function's anaphoric counterpart is @code{--some}.
@example
@ -3981,8 +4018,11 @@ Functions iterating over lists for side effect only.
@defun -each (list fn)
Call @var{fn} on each element of @var{list}.
Return nil; this function is intended for side effects.
Its anaphoric counterpart is @code{--each}. For access to the current
element's index in @var{list}, see @code{-each-indexed} (@pxref{-each-indexed}).
Its anaphoric counterpart is @code{--each}.
For access to the current element's index in @var{list}, see
@code{-each-indexed} (@pxref{-each-indexed}).
@example
@group
@ -4006,6 +4046,7 @@ Call @var{fn} on each @var{item} in @var{list}, while (@var{pred} @var{item}) is
Once an @var{item} is reached for which @var{pred} returns nil, @var{fn} is no
longer called. Return nil; this function is intended for side
effects.
Its anaphoric counterpart is @code{--each-while}.
@example
@ -4029,6 +4070,7 @@ Its anaphoric counterpart is @code{--each-while}.
Call @var{fn} on each index and element of @var{list}.
For each @var{item} at @var{index} in @var{list}, call (funcall @var{fn} @var{index} @var{item}).
Return nil; this function is intended for side effects.
See also: @code{-map-indexed} (@pxref{-map-indexed}).
@example
@ -4051,6 +4093,7 @@ See also: @code{-map-indexed} (@pxref{-map-indexed}).
@defun -each-r (list fn)
Call @var{fn} on each element of @var{list} in reversed order.
Return nil; this function is intended for side effects.
Its anaphoric counterpart is @code{--each-r}.
@example
@ -4075,6 +4118,7 @@ Call @var{fn} on each @var{item} in reversed @var{list}, while (@var{pred} @var{
Once an @var{item} is reached for which @var{pred} returns nil, @var{fn} is no
longer called. Return nil; this function is intended for side
effects.
Its anaphoric counterpart is @code{--each-r-while}.
@example
@ -4099,6 +4143,7 @@ Call @var{fn} @var{num} times, presumably for side effects.
@var{fn} is called with a single argument on successive integers
running from 0, inclusive, to @var{num}, exclusive. @var{fn} is not called
if @var{num} is less than 1.
This function's anaphoric counterpart is @code{--dotimes}.
@example

Loading…
Cancel
Save