* doco srfi-1 iota
@ 2003-07-07 21:57 Kevin Ryde
2003-07-07 23:16 ` Han-Wen Nienhuys
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ryde @ 2003-07-07 21:57 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
* srfi-modules.texi (SRFI-1 Constructors): In iota, reword a bit for
clarity and add a couple of examples.
I found the formula for each element less clear than it could be, and
thought a couple of examples would be enough to illustrate what
happens.
- Scheme Procedure: iota count [start step]
Return a list containing COUNT numbers, starting from START and
adding STEP each time. The default START is 0, the default STEP
is 1. For example,
(iota 6) => (0 1 2 3 4 5)
(iota 4 2.5 -2) => (2.5 0.5 -1.5 -3.5)
This function takes its name from the corresponding primitive in
the APL language.
[-- Attachment #2: srfi-modules.texi.iota.diff --]
[-- Type: text/plain, Size: 807 bytes --]
--- srfi-modules.texi.~1.18.~ 2003-06-05 01:47:08.000000000 +1000
+++ srfi-modules.texi 2003-07-06 11:53:08.000000000 +1000
@@ -220,12 +220,17 @@
@end deffn
@deffn {Scheme Procedure} iota count [start step]
-Return a list containing @var{count} elements, where each element is
-calculated as follows:
+Return a list containing @var{count} numbers, starting from
+@var{start} and adding @var{step} each time. The default @var{start}
+is 0, the default @var{step} is 1. For example,
-@var{start} + (@var{count} - 1) * @var{step}
+@example
+(iota 6) @result{} (0 1 2 3 4 5)
+(iota 4 2.5 -2) @result{} (2.5 0.5 -1.5 -3.5)
+@end example
-@var{start} defaults to 0 and @var{step} defaults to 1.
+This function takes its name from the corresponding primitive in the
+APL language.
@end deffn
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* doco srfi-1 iota
2003-07-07 21:57 doco srfi-1 iota Kevin Ryde
@ 2003-07-07 23:16 ` Han-Wen Nienhuys
2003-07-11 22:43 ` Kevin Ryde
0 siblings, 1 reply; 3+ messages in thread
From: Han-Wen Nienhuys @ 2003-07-07 23:16 UTC (permalink / raw)
Cc: guile-devel
user42@zip.com.au writes:
> * srfi-modules.texi (SRFI-1 Constructors): In iota, reword a bit for
> clarity and add a couple of examples.
>
> I found the formula for each element less clear than it could be, and
> thought a couple of examples would be enough to illustrate what
> happens.
In general, I wonder why the SRFI documentation doesn't have much
examples. In some cases, the text of the SRFI itself is more clear.
which begs the question, why aren't the SRFIs themselves used as
documentation?
--
Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.xs4all.nl/~hanwen
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: doco srfi-1 iota
2003-07-07 23:16 ` Han-Wen Nienhuys
@ 2003-07-11 22:43 ` Kevin Ryde
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2003-07-11 22:43 UTC (permalink / raw)
Cc: guile-devel
Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
>
> which begs the question, why aren't the SRFIs themselves used as
> documentation?
Oh, well, I suppose redoing it matches the format of the rest of the
manual, and allows nice indexing and cross references.
In any case I made this particular change.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-11 22:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-07 21:57 doco srfi-1 iota Kevin Ryde
2003-07-07 23:16 ` Han-Wen Nienhuys
2003-07-11 22:43 ` Kevin Ryde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).