From: Mark H Weaver Date: Thu, 25 Sep 2014 02:03:58 +0000 (-0400) Subject: doc: Improve description of vector-unfold and vector-unfold-right. X-Git-Url: http://git.hcoop.net/bpt/guile.git/commitdiff_plain/ff4af3df238815e434b62693a3c02b8213667ebe 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. --- diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index b1776c6a0..2cf9fd154 100644 --- a/doc/ref/srfi-modules.texi +++ b/doc/ref/srfi-modules.texi @@ -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. diff --git a/module/srfi/srfi-43.scm b/module/srfi/srfi-43.scm index c1612aa37..153b0cbcd 100644 --- a/module/srfi/srfi-43.scm +++ b/module/srfi/srfi-43.scm @@ -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)