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

View file

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