use of vector-map is not srfi-43 compatible?
Linas Vepstas
(08 Aug 2020 17:44 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
Wolfgang Corcoran-Mathe
(08 Aug 2020 17:53 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
Linas Vepstas
(08 Aug 2020 18:26 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
Marc Nieper-Wißkirchen
(08 Aug 2020 18:34 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
Linas Vepstas
(08 Aug 2020 19:05 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
Shiro Kawai
(08 Aug 2020 19:23 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
Wolfgang Corcoran-Mathe
(08 Aug 2020 19:21 UTC)
|
Re: use of vector-map is not srfi-43 compatible? Marc Nieper-Wißkirchen (08 Aug 2020 19:40 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
Shiro Kawai
(08 Aug 2020 20:09 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
John Cowan
(09 Aug 2020 00:27 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
Marc Nieper-Wißkirchen
(09 Aug 2020 09:08 UTC)
|
Re: use of vector-map is not srfi-43 compatible?
Alex Shinn
(11 Aug 2020 01:14 UTC)
|
Am Sa., 8. Aug. 2020 um 21:21 Uhr schrieb Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>: > > The SRFI 43 procedure is certainly much more useful than the R7RS/SRFI > > 133 procedure. On the other hand, the R7RS/SRFI 133 procedure does > > seem to follow the general shape of the XXX-map procedures where XXX > > is some type of collection (object). > > Indeed, SRFI 43 vector-map, with its two-argument mapped procedure, is > indeed an odd case among the many "map" functions of Scheme. While > having access to the index is useful, the R7/SRFI 133 versions are > more consistent. On a second thought, the change from SRFI 43 to R7RS wasn't that necessary for consistency: It really depends on how we view a (Scheme) vector. We can either think of a vector as a list of values (which has a random access O(1) getter and setter), or we can think of a vector as a finite map, which maps an interval of natural numbers to Scheme values. SRFI 43's vector-map has adopted the second view, and it is likely the better view. And with this view in mind, the "vector-map" of SRFI 43 is completely regular. See SRFI 125's hash-table-map for another higher-order mapping procedure that is defined for another type of finite map. Ergo, we should have filed a ticket for R7RS.