summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar John Cowan 2021-06-24 19:21:26 -0400
committerGravatar GitHub 2021-06-24 19:21:26 -0400
commit784f6e6dccb6f70732f934c0101a3e4580f0953e (patch)
tree213302b088d6686adedf17d3d2d4e80280a89bc0
parentWIP examples (diff)
Update spec.md
-rw-r--r--spec.md23
1 files changed, 14 insertions, 9 deletions
diff --git a/spec.md b/spec.md
index 3f73f77..ba85c91 100644
--- a/spec.md
+++ b/spec.md
@@ -248,7 +248,7 @@ invokes *updater* on it, and sets the value of *key* to be
the result of calling *updater* as if by `dict-set`,
but may do so more efficiently. Returns the updated dictionary.
-`(dict-pop! `*dictionary* [*failure*]`)`
+`(dict-pop! `*dictionary*`)`
Chooses an association from *dictionary* and returns three values:
a dictionary that contains all associations of *dictionary* except the chosen one,
@@ -257,8 +257,7 @@ If the dictionary is ordered, the first association is chosen;
otherwise the chosen association is arbitrary.
If dictionary contains no associations and *failure* is supplied,
-then the thunk *failure* is invoked and its values returned.
-Otherwise, it is an error.
+it is an error.
```
(dict-pop! dict) => # 3 values
@@ -377,26 +376,32 @@ that *pred* returned true as an an exact integer.
`(dict-any `*pred dictionary*`)`
Passes each association of *dictionary* as two arguments to *pred*
-and returns the value of the first call to *pred* that returns true.
+and returns the value of the first call to *pred* that returns true,
+after which no further calls are made.
If the dictionary type is inherently ordered, associations are processed in the
inherent order; otherwise in an arbitrary order.
If all calls return false, `dict-any` returns false.
```
-FIXME
+(define (both-even? k v) (and (even? k) (even? v))
+(dict-any both-even? '((2 . 4) (3 . 5))) => #t
+(dict-any both-even? '((1 . 2) (3 . 4))) => #f
```
`(dict-every `*pred dictionary*`)`
Passes each association of *dictionary* as two arguments to *pred*
-and returns `#f` after the first call to *pred* that returns false.
+and returns `#f` after the first call to *pred* that returns false
+after which no further calls are made.
If the dictionary type is inherently ordered, associations are processed in the
inherent order; otherwise in an arbitrary order.
If all calls return true, `dict-any` returns the value of the last call,
or `#t` if no calls are made.
```
-FIXME
+(define (some-even? k v) (or (even? k) (even? v))
+(dict-every some-even? '((2 . 3) (3 . 4))) => #t
+(dict-every some-even? '((1 . 3) (3 . 4))) => #f
```
`(dict-keys `*dictionary*`)`
@@ -440,7 +445,7 @@ Returns the result of the last invocation,
or *knil* if there was no invocation.
```
-FIXME
+(dict-fold + 0 '((1 . 2) (3 . 4))) => 10
```
`(dict-map->list `*proc dictionary*`)`
@@ -478,7 +483,7 @@ of the procedures defined in this SRFI (other than
`register-dictionary!` itself), and a *proc* argument
is the specific procedure implementing it for this type.
These procedures only need to handle the full argument list
-when defining `dict-ref`, `dict-update!`, and `dict-pop!`, as the
+when defining `dict-ref` and `dict-update!`, as the
defaults have already been supplied by the framework.
Arguments for the six procedures `dictionary?`, `dict-size`,
@137 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-11-09sync with driver version of this fileGravatar weihs 1-2/+6 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@136 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-10-07Patch from Alexander Neundorf to add proto for raw1394_iso_recv_flush()Gravatar bencollins 1-0/+3 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@135 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-09-26Update for new version, 0.10.1.Gravatar bencollins 2-2/+3 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@133 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-09-26Fixup async_stream to use same local req variable for reentrancy.Gravatar bencollins 1-10/+10 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@132 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-09-26Fix postinst so device node gets created.Gravatar bencollins 2-4/+6 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@131 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-09-11Async stream support from Jim Radford.Gravatar bencollins 3-0/+42 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@130 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-22Increase so maj/age so account for new recv-flush call.Gravatar bencollins 1-2/+2 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@129 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-22Patch from Stephen Tiedemann to allow reentrancy in raw1394's usage ofGravatar bencollins 7-200/+199 raw1394_request's. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@128 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-17Patch from Dan Maas to add raw1394_iso_recv_flush() call to API, using theGravatar bencollins 2-3/+25 RAW1394_IOC_ISO_RECV_FLUSH ioctl. Updated the ieee1394-ioctl.h file aswell. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@127 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-17pkg-config support from Kristian Hogsberg.Gravatar bencollins 3-1/+15 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@126 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-17Remove trailing whitespace, which automake chokes on.Gravatar bencollins 1-1/+1 Patch from Manish Singh. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@125 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Fixed section for -dev package.Gravatar bencollins 1-1/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@124 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Re-add the pdf buildGravatar bencollins 1-0/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@121 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Update Debian files.Gravatar bencollins 4-25/+73 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@120 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Ok, the Debian package was way out of sync with upstreamGravatar bencollins 1-1/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@119 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Ooops...libtool works a bit different than I thought, but atleast it worksGravatar bencollins 2-6/+1 like it is supposed to. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@117 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Generate and install the pdf in the Debian package.Gravatar bencollins 3-3/+4 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@114 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Don't run configure at the end of autogen.sh. Also, remove autom4te.cache.Gravatar bencollins 1-1/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@113 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Update Debian maintainerGravatar bencollins 1-1/+2 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@112 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Update Debian changelog.Gravatar bencollins 1-0/+8 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@111 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13File doesn't really seem needed. The NEWS file gives a good overview, andGravatar bencollins 1-4/+0 the svn log is more than verbose enough for info seekers. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@110 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Fix compiler warnings.Gravatar bencollins 4-12/+22 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@109 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Updates from 0.10.0 release.Gravatar bencollins 4-5/+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