Eliminate numeric-range over inexact numbers? John Cowan (27 Aug 2020 23:05 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (28 Aug 2020 02:12 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (28 Aug 2020 03:33 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (28 Aug 2020 06:31 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (28 Aug 2020 16:01 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (28 Aug 2020 16:28 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (28 Aug 2020 16:59 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (28 Aug 2020 17:03 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (28 Aug 2020 18:10 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (28 Aug 2020 18:54 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (29 Aug 2020 17:29 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (29 Aug 2020 17:44 UTC)
Re: Eliminate numeric-range over inexact numbers? John Cowan (30 Aug 2020 00:12 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (30 Aug 2020 08:54 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (30 Aug 2020 17:02 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (30 Aug 2020 17:39 UTC)
Re: Eliminate numeric-range over inexact numbers? John Cowan (30 Aug 2020 18:21 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (30 Aug 2020 18:46 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (30 Aug 2020 19:30 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (30 Aug 2020 20:40 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (30 Aug 2020 20:44 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (30 Aug 2020 20:56 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (30 Aug 2020 21:07 UTC)
Re: Eliminate numeric-range over inexact numbers? John Cowan (30 Aug 2020 21:08 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (31 Aug 2020 02:40 UTC)
Re: Eliminate numeric-range over inexact numbers? John Cowan (31 Aug 2020 12:50 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (31 Aug 2020 16:30 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (30 Aug 2020 21:08 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (30 Aug 2020 21:15 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (30 Aug 2020 21:29 UTC)
Re: Eliminate numeric-range over inexact numbers? Wolfgang Corcoran-Mathe (28 Aug 2020 18:13 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (28 Aug 2020 18:55 UTC)
Re: Eliminate numeric-range over inexact numbers? John Cowan (28 Aug 2020 20:45 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (28 Aug 2020 21:11 UTC)
Re: Eliminate numeric-range over inexact numbers? John Cowan (29 Aug 2020 00:43 UTC)
Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen (29 Aug 2020 08:21 UTC)

Re: Eliminate numeric-range over inexact numbers? Marc Nieper-Wißkirchen 30 Aug 2020 17:39 UTC

Am So., 30. Aug. 2020 um 19:02 Uhr schrieb Wolfgang Corcoran-Mathe
<xxxxxx@sigwinch.xyz>:
>
> On 2020-08-29 20:12 -0400, John Cowan wrote:
> > On Sat, Aug 29, 2020 at 1:44 PM Marc Nieper-Wißkirchen <
> > xxxxxx@nieper-wisskirchen.de> wrote:
> >
> > > > Yes.  An obvious extension is to accept #f as the <end> argument of
> > > > numeric-range (or to make <end> optional and reverse the argument
> > > > order), but this would require revision of range-length, range-end,
> > > > and the other procedures which expect ranges to have finite length.
> > >
> >
> > As infinite ranges are inconsistent with the idea of ranges as compact
> > vectors (we don't have infinite vectors), I'm going to rule these out.
>
> Since the "ranges as compact vectors" is now part of the SRFI document,
> I think it's a bit odd that range-map->list and friends have no vector
> counterparts.  I'd propose adding them, since they pose no difficulty:
>
>
> (range-map->vector proc range)
>
> Returns a vector of the results of applying proc to each element of range
> in order. However, the order in which proc is actually applied to the
> elements is unspecified. This procedure must run in O(n) time.
>
> (range-filter->vector pred range)
> (range-remove->vector pred range)
>
> Returns a vector containing the elements of range that satisfy / do not
> satisfy pred. This procedure must run in O(n) time.

I agree that it makes a lot of sense to add them.

In the R7RS (small), it says that "if multiple returns occur from vector-map,
the values returned by earlier returns are not mutated". An analogous
sentence makes sense of the ...->vector procedures. Given the presence
of call/cc, this is the "right thing". (The same applies for the other
higher-order procedures as well, of course, which are generally called
"control-flow" procedures in the report.)

(Unfortunately, most SRFIs are written in a way as if call/cc does not
exist and many are written as if there was no concept of proper tail
calls in Scheme.)

Marc