summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar John Cowan 2022-02-05 14:53:58 -0500
committerGravatar GitHub 2022-02-05 14:53:58 -0500
commitf7d9516172bf82e0a49563c3d4a5efe0aff17c98 (patch)
treed13d4c19fca50381f0af1c0ebc9f37b86e0862d3
parentUpdate srfi-225.html (diff)
Update srfi-225.html
-rw-r--r--srfi-225.html33
1 files changed, 21 insertions, 12 deletions
diff --git a/srfi-225.html b/srfi-225.html
index 3232940..48fed8b 100644
--- a/srfi-225.html
+++ b/srfi-225.html
@@ -393,25 +393,35 @@ and <code>dict-find-update</code>.
The last two may be <code>#f</code> if the dictionary does not make use of these functions.</p>
<p>If no comparator is relevant to the dictionary type, returns <code>#f</code>.</p>
<h3 id="iteration">Iteration</h3>
-<p><code>(dict-for-each</code>&nbsp;<em>dto proc dict</em><code>)</code></p>
+ <p><code>(dict-for-each</code>&nbsp;<em>dto proc dict</em> [ <em>start</em> [ <em>end</em> ] ] <code>)</code></p>
<p>Invokes <em>proc</em> on each key of <em>dict</em> and its corresponding value in that order.
This procedure is used for doing operations on the whole dictionary.
- If the dictionary type is inherently ordered, associations are processed in that order; otherwise in an arbitrary order.
- Returns an unspecified value.</p>
+ If the dictionary type is inherently ordered, associations are processed in the order specified
+ by the dictionary's comparator; otherwise they are processed in an arbitrary order.
+ The <em>start</em> and <em>end</em> arguments specify the inclusive lower bound and exclusive upper bound
+ of the keys (in the sense of the dictionary's comparator).
+ They can can provide additional efficiency when iterating over part of the dictionary
+ if the dictionary is ordered. The procedure returns an unspecified value.</p>
<blockquote><pre>(define (write-key key value) (write key))
(dict-for-each write-key aed dict) =&gt; unspecified
; writes &quot;135&quot; to current output</pre></blockquote>
-<h3 id="generator-procedures">Generator procedures</h3>
-<p><code>(dict-&gt;generator</code>&nbsp;<em>dto dict</em><code>)</code></p>
+<p><code>(dict-&gt;generator</code>&nbsp;<em>dto dict</em> [ <em>start</em> [ <em>end</em> ] ] <code>)</code></p>
<p>Returns a <a href="https://srfi.schemers.org/srfi-158/srfi-158.html">SRFI 158 generator</a>
that when invoked returns the associations of <em>dict</em> as pairs.
- When no associations are left, returns an end-of-file object.
- If the dictionary type is inherently ordered, associations are processed in that order;
- otherwise in an arbitrary order.
- It is an error to mutate <em>dict</em> until the generator is exhausted.</p>
-<p><code>(dict-set-accumulator</code>&nbsp;<em>dto dict</em><code>)</code><br>
+ This procedure is used for doing operations on the whole dictionary.
+ If the dictionary type is inherently ordered, associations are processed in the order specified
+ by the dictionary's comparator; otherwise they are processed in an arbitrary order.
+ <p>The <em>start</em> and <em>end</em> arguments specify the inclusive lower bound and exclusive upper bound
+ of the keys to be processed (in the sense of the dictionary's comparator).
+ They can can provide additional efficiency when iterating over part of the dictionary
+ if the dictionary is ordered. The procedure returns an unspecified value.</p>
+ <p>It is an error to mutate <em>dict</em> until after the generator is exhausted.
+ When all the associations have been processed, returns an end-of-file object.</>
+ <p><code>(dict-set-accumulator</code>&nbsp;<em>dto dict</em><code>)</code><br>
<code>(dict-set!-accumulator</code>&nbsp;<em>dto dict accum</em><code>)</code></p>
-<p>Returns a SRFI 158 accumulator procedure that when invoked on a pair adds the <code>car</code> and <code>cdr</code> of the pair as a key and value of <em>dict</em> as if by <em>dict-set</em>, eventually returning the new value of <em>dict</em>. If invoked on an end-of-file object, no action is taken and <em>dict</em> is returned.</p>
+<p>Returns a SRFI 158 accumulator procedure that when invoked on a pair adds the <code>car</code> and <code>cdr</code> of the pair
+ as a key and value of <em>dict</em> as if by <em>dict-set</em>, eventually returning the new value of <em>dict</em>.
+ If invoked on an end-of-file object, no action is taken and <em>dict</em> is returned.</p>
<p>The <code>!</code> variant uses <code>dict-set!</code> instead.
<p><code>(dict-adjoin-accumulator</code>&nbsp;<em>dto dict</em><code>)</code><br>
<code>(dict-adjoin!-accumulator!</code>&nbsp;<em>dto dict</em><code>)</code></p>
@@ -600,7 +610,6 @@ new dictionary types that may not have complete dictionary APIs:</p>
<dt>dict-map-&gt;list</dt>
<dd>dict-fold</dd>
- <dt>dict-&gt;alist</dt>
<dd>dict-map-&gt;list</dd>
<dt>dict-for-each&gt;</dt>
'>+14 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@108 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-04-23add libtoolize to bootstrapGravatar ddennedy 1-1/+10 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@107 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-04-21added Dan Maas' rawiso docsGravatar ddennedy 1-32/+295 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@106 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-04-07new_handle_on_port() error path fix from Jim RadfordGravatar dmaas 1-1/+3 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@105 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-03-26add raw1394_new_handle_on_port() convenience functionGravatar dmaas 2-1/+41 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@104 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-02-22Updates for new rawiso ioctl interface.Gravatar bencollins 3-37/+125 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@103 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-15add iso_xmit_sync() and iso_xmit_write(); clean up iso handling a bitGravatar dmaas 5-39/+161 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@102 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-15implement tag matching for rawiso receptionGravatar dmaas 3-4/+12 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@101 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-06back out previous commit - don't drop the legacy API just yetGravatar dmaas 6-173/+130 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@100 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-05emulate legacy ISO reception API on top of new rawiso APIGravatar dmaas 7-131/+174 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@99 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-24update iso API for multi-channel reception and new packet buffer layoutGravatar dmaas 4-123/+236 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@98 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-20oops, irq_interval needs to be signedGravatar anonymous 1-1/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@97 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-20dmaas - renamed exported arm definitions into the raw1394_ namespace; ↵Gravatar anonymous 3-124/+48 brought kernel-raw1394.h back in sync with the kernel version git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@96 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-16rawiso updates:Gravatar dmaas 3-18/+25 - changed return type of rawiso xmit/recv handlers from int to enum raw1394_iso_disposition - added an ioctl (RAW1394_ISO_QUEUE_ACTIVITY) to force an ISO_ACTIVITY event into the queue. This is needed for handling RAW1394_ISO_DEFER, to kick us out of the next read() instead of sleeping forever. - removed references to "8-byte" isochronous header - this is an OHCI-specific implementation detail git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@95 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-11-18fix cplusplus extern C blockGravatar ddennedy 1-4/+4 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@94 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-11-18merged rawiso branchGravatar ddennedy 7-6/+488 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@93 53a565d1-3bb7-0310-b661-cf11e63c67ab