1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

doc: Improve description of vector-unfold and vector-unfold-right.

* doc/ref/srfi-modules.texi (SRFI-43 Constructors)[vector-unfold]:
  Improve description.
* module/srfi/srfi-43.scm (vector-unfold, vector-unfold-right):
  Improve docstrings.
This commit is contained in:
Mark H Weaver 2014-09-24 22:03:58 -04:00
parent 447af515a3
commit ff4af3df23
2 changed files with 15 additions and 15 deletions

View file

@ -1,7 +1,7 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008,
@c 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
@c Copyright (C) 1996, 1997, 2000-2004, 2006, 2007-2014
@c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@node SRFI Support
@ -4524,11 +4524,11 @@ Create and return a vector whose elements are @var{x} @enddots{}.
@end deffn
@deffn {Scheme Procedure} vector-unfold f length initial-seed @dots{}
The fundamental vector constructor. Create a vector whose length is
@var{length} and iterates across each index k from 0 up to
@var{length} - 1, applying @var{f} at each iteration to the current index
and current seeds, in that order, to receive n + 1 values: first, the
element to put in the kth slot of the new vector and n new seeds for
The fundamental vector constructor. Create a vector whose length
is @var{length} and iterates across each index k from 0 up to
@var{length} - 1, applying @var{f} at each iteration to the current
index and current seeds, in that order, to receive n + 1 values: the
element to put in the kth slot of the new vector, and n new seeds for
the next iteration. It is an error for the number of seeds to vary
between iterations.

View file

@ -104,10 +104,10 @@
The fundamental vector constructor. Create a vector whose length is
LENGTH and iterates across each index k from 0 up to LENGTH - 1,
applying F at each iteration to the current index and current seeds,
in that order, to receive n + 1 values: first, the element to put in
the kth slot of the new vector and n new seeds for the next iteration.
It is an error for the number of seeds to vary between iterations."
applying F at each iteration to the current index and current seeds, in
that order, to receive n + 1 values: the element to put in the kth slot
of the new vector, and n new seeds for the next iteration. It is an
error for the number of seeds to vary between iterations."
((f len)
(assert-procedure f 'vector-unfold)
(assert-nonneg-exact-integer len 'vector-unfold)
@ -154,10 +154,10 @@ It is an error for the number of seeds to vary between iterations."
The fundamental vector constructor. Create a vector whose length is
LENGTH and iterates across each index k from LENGTH - 1 down to 0,
applying F at each iteration to the current index and current seeds,
in that order, to receive n + 1 values: first, the element to put in
the kth slot of the new vector and n new seeds for the next iteration.
It is an error for the number of seeds to vary between iterations."
applying F at each iteration to the current index and current seeds, in
that order, to receive n + 1 values: the element to put in the kth slot
of the new vector, and n new seeds for the next iteration. It is an
error for the number of seeds to vary between iterations."
((f len)
(assert-procedure f 'vector-unfold-right)
(assert-nonneg-exact-integer len 'vector-unfold-right)