mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +02:00
(SRFI-1 Length Append etc): Add an append-reverse example.
This commit is contained in:
parent
8ce0a099f7
commit
86cd2080d8
1 changed files with 7 additions and 3 deletions
|
@ -414,9 +414,13 @@ have a limit on the number of arguments a function takes, which the
|
|||
|
||||
@deffn {Scheme Procedure} append-reverse rev-head tail
|
||||
@deffnx {Scheme Procedure} append-reverse! rev-head tail
|
||||
Reverse @var{rev-head}, append @var{tail} and return the result. This
|
||||
is equivalent to @code{(append (reverse @var{rev-head}) @var{tail})},
|
||||
but more efficient.
|
||||
Reverse @var{rev-head}, append @var{tail} to it, and return the
|
||||
result. This is equivalent to @code{(append (reverse @var{rev-head})
|
||||
@var{tail})}, but its implementation is more efficient.
|
||||
|
||||
@example
|
||||
(append-reverse '(1 2 3) '(4 5 6)) @result{} (3 2 1 4 5 6)
|
||||
@end example
|
||||
|
||||
@code{append-reverse!} may modify @var{rev-head} in order to produce
|
||||
the result.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue