Re: Multiple ranges for range-fold, range-for-each, ... Wolfgang Corcoran-Mathe (31 Aug 2020 16:35 UTC)
Re: Multiple ranges for range-fold, range-for-each, ... Marc Nieper-Wißkirchen (31 Aug 2020 17:54 UTC)
Re: Multiple ranges for range-fold, range-for-each, ... John Cowan (31 Aug 2020 18:20 UTC)
Re: Multiple ranges for range-fold, range-for-each, ... Wolfgang Corcoran-Mathe (31 Aug 2020 18:43 UTC)
Re: Multiple ranges for range-fold, range-for-each, ... Wolfgang Corcoran-Mathe (31 Aug 2020 18:49 UTC)
Re: Multiple ranges for range-fold, range-for-each, ... Marc Nieper-Wißkirchen (31 Aug 2020 18:57 UTC)
Re: Multiple ranges for range-fold, range-for-each, ... Marc Nieper-Wißkirchen (31 Aug 2020 18:55 UTC)
Re: Multiple ranges for range-fold, range-for-each, ... Wolfgang Corcoran-Mathe (01 Sep 2020 05:28 UTC)
Re: Multiple ranges for range-fold, range-for-each, ... John Cowan (01 Sep 2020 22:56 UTC)
Re: Multiple ranges for range-fold, range-for-each, ... Wolfgang Corcoran-Mathe (01 Sep 2020 23:50 UTC)

Re: Multiple ranges for range-fold, range-for-each, ... Wolfgang Corcoran-Mathe 01 Sep 2020 23:50 UTC

On 2020-09-01 18:56 -0400, John Cowan wrote:
> On Mon, Aug 31, 2020 at 2:43 PM Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
> wrote:
>
> > And what about "range-filter-map"? (See SRFI 1).
> >
> > It's probably a good idea, since it's likely to be much more efficient
> > than the composition of range-map and range-filter.
> >
>
> But that isn't what SRFI 1 filter-map does.  It invokes the mapper function
> and then discards all #f results.

I was referring to:

    (range-filter values (range-map foo r))

which is equivalent to (range-filter-map foo r), but obviously less
efficient.

> In any case, this is fine for a list, but not so fine for a vector-like
> object, as the output would have to be accumulated in a list and then
> converted to a vector.

Agreed.  I've added range-filter-map and range-filter-map->list, and
dropped range-filter-map->vector.  On the same grounds, let's get rid
of range-{filter, remove}->vector.

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>

"There is no first attack in karate." --Inscription on a monument
to Gichin Funakoshi in Kamakura