[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: API conflicts

This page is part of the web mail archives of SRFI 44 from before July 7th, 2015. The new archives for SRFI 44 are here. Eventually, the entire history will be moved there, including any new messages.



Oops, one fix.

From: Shiro Kawai <shiro@xxxxxxxx>
Subject: API conflicts (Was: Re: Reasons for withdrawal)

>      list= in this srfi takes two lists.  list= in srfi-1 takes
>      arbitrary number of lists.

The signature under "Scheme collections" suggested this, but
the description under "Collections" certainly permits arbitrary
number of collections.
But srfi-1's list= clearly specifies the order of argument
passed to elt=, while srfi-44 doesn't, so two function may
behave differently in some cases.

Besides the above signature mismatch, I find other typos and errors
in other signatures.   I attach a patch of what I noticed so far.

--shiro


--- srfi-44.html.orig	2003-10-28 18:58:49.000000000 -1000
+++ srfi-44.html	2003-10-28 19:59:55.000000000 -1000
@@ -1681,9 +1681,8 @@
             <i>procedure:</i> <b>list-equivalence-function</b> list =&gt; procedure<br>
           </p>           
           <p>
-            <i>procedure:</i> <b>list-copy</b> list <b>=&gt;</b>
+            <i>procedure:</i> <b>list-copy</b> list =&gt; list<br>
             <i>procedure:</i> <b>list->list</b> list =&gt; list
-            list
           </p>
           <p>
             <i>procedure:</i> <b>list?</b> value =&gt; boolean<br>
@@ -1709,7 +1708,7 @@
             exact integer
           </p>
           <p>
-            <i>procedure:</i> <b>list=</b> elt= list1 list2 =&gt;
+            <i>procedure:</i> <b>list=</b> elt= list1 ... =&gt;
             boolean
           </p>
           <p>
@@ -1823,23 +1822,17 @@
           <p>
             <i>procedure:</i> <b>alist-count</b> alist value =&gt; exact integer<br>
             <i>procedure:</i> <b>alist-key-count</b> alist value =&gt; exact integer<br>
-            <i>procedure:</i> <b>alist-size</b> alist value =&gt; exact integer
+            <i>procedure:</i> <b>alist-size</b> alist =&gt; exact integer
           </p>
           <p>
             <i>procedure:</i> <b>alist-copy</b> alist =&gt; alist<br>
-            <i>procedure:</i> <b>alist->list</b> alist =&gt; list<br>
-            <i>procedure:</i> <b>alist-keys>list</b> alist =&gt; list
+            <i>procedure:</i> <b>alist-&gt;list</b> alist =&gt; list<br>
+            <i>procedure:</i> <b>alist-keys-&gt;list</b> alist =&gt; list
           </p>
           <p>
             <i>procedure:</i> <b>alist?</b> value =&gt; boolean
           </p>
           <p>
-            <i>procedure:</i> <b>alist-count</b> alist value =&gt;
-            integer<br>
-             <i>procedure:</i> <b>alist-count-keys</b> alist value
-            =&gt; integer
-          </p>
-          <p>
             <i>procedure:</i> <b>alist=</b> elt= alist1 alist2
             =&gt; boolean
           </p>
@@ -1848,30 +1841,30 @@
             =&gt; scheme-list
           </p>
           <p>
-            <i>procedure:</i> <b>alist-get</b> alist value =&gt;
-            <i>procedure:</i> <b>alist-get-all</b> alist value =&gt;
+            <i>procedure:</i> <b>alist-get</b> alist key =&gt; value
+            <i>procedure:</i> <b>alist-get-all</b> alist key =&gt;
             list
           </p>
           <p>
-            <i>procedure:</i> <b>alist-put</b> alist value value
+            <i>procedure:</i> <b>alist-put</b> alist key value
             =&gt; alist<br>
-             <i>procedure:</i> <b>alist-put!</b> alist value value
+             <i>procedure:</i> <b>alist-put!</b> alist key value
             =&gt; alist<br>
-             <i>procedure:</i> <b>alist-update</b> alist value func
+             <i>procedure:</i> <b>alist-update</b> alist key func
             [absence-thunk]=&gt; alist<br>
-             <i>procedure:</i> <b>alist-update!</b> alist value
+             <i>procedure:</i> <b>alist-update!</b> alist key
             func [absence-thunk]=&gt; alist
           </p>
           <p>
-            <i>procedure:</i> <b>alist-remove</b> alist value =&gt;
+            <i>procedure:</i> <b>alist-remove</b> alist key =&gt;
             alist<br>
-             <i>procedure:</i> <b>alist-remove!</b> alist value
+             <i>procedure:</i> <b>alist-remove!</b> alist key
             =&gt; alist
           </p>
           <p>
-            <i>procedure:</i> <b>alist-remove-any</b> alist value
+            <i>procedure:</i> <b>alist-remove-any</b> alist key
             =&gt; alist<br>
-             <i>procedure:</i> <b>alist-remove-any!</b> alist value
+             <i>procedure:</i> <b>alist-remove-any!</b> alist key
             =&gt; alist
           </p>
           <p>
@@ -1914,7 +1907,7 @@
           </p>
           <p>
             <i>procedure:</i> <b>make-vector</b> size [default]
-            <b>=&gt;</b> list
+            <b>=&gt;</b> vector
           </p>
           <blockquote>
             Creates a new vector with the provided size. If default
@@ -1936,7 +1929,7 @@
             <i>procedure:</i> <b>vector-empty?</b> vector =&gt; boolean
           </p>
           <p>
-            <i>procedure:</i> <b>vector-contains?</b> value =&gt;
+            <i>procedure:</i> <b>vector-contains?</b> vector value =&gt;
             boolean
           </p>
           <p>
@@ -1955,12 +1948,12 @@
           </p>
           <p>
             <i>procedure:</i> <b>vector-set</b> vector index value 
-            =&gt; value<br>
+            =&gt; vector<br>
             <i>procedure:</i> <b>vector-set!</b> vector index value 
-            =&gt; value<br>
+            =&gt; vector<br>
           </p>
           <p>
-            <i>procedure:</i> <b>vector=</b> elt= vector1 vector2
+            <i>procedure:</i> <b>vector=</b> elt= vector1 ...
             =&gt; boolean
           </p>
         </blockquote>
@@ -2000,7 +1993,7 @@
             <i>procedure:</i> <b>string?</b> value =&gt; boolean
           </p>
           <p>
-            <i>procedure:</i> <b>string-contains?</b> character
+            <i>procedure:</i> <b>string-contains?</b> string character
             =&gt; boolean
           </p>
           <p>
@@ -2019,12 +2012,12 @@
           </p>
           <p>
             <i>procedure:</i> <b>string-set</b> string index character
-            =&gt; value<br>
-            <i>procedure:</i> <b>string-set!</b> vector index character
-            =&gt; value<br>
+            =&gt; string<br>
+            <i>procedure:</i> <b>string-set!</b> string index character
+            =&gt; string<br>
           </p>
           <p>
-            <i>procedure:</i> <b>string=</b> elt= string1 string2
+            <i>procedure:</i> <b>string=</b> elt= string1 ...
             =&gt; boolean
           </p>
         </blockquote>