New draft (#12) of SRFI 224: Integer Mappings
Arthur A. Gleckler
(21 Jun 2021 17:06 UTC)
|
Re: New draft (#12) of SRFI 224: Integer Mappings
Marc Nieper-Wißkirchen
(21 Jun 2021 17:59 UTC)
|
Re: New draft (#12) of SRFI 224: Integer Mappings
Wolfgang Corcoran-Mathe
(21 Jun 2021 18:33 UTC)
|
Re: New draft (#12) of SRFI 224: Integer Mappings
Marc Nieper-Wißkirchen
(21 Jun 2021 19:04 UTC)
|
Re: New draft (#12) of SRFI 224: Integer Mappings Wolfgang Corcoran-Mathe (21 Jun 2021 20:23 UTC)
|
Re: New draft (#12) of SRFI 224: Integer Mappings
Marc Nieper-Wißkirchen
(21 Jun 2021 20:30 UTC)
|
Re: New draft (#12) of SRFI 224: Integer Mappings Wolfgang Corcoran-Mathe 21 Jun 2021 20:23 UTC
On 2021-06-21 21:04 +0200, Marc Nieper-Wißkirchen wrote: > (fxmapping-filter-map (lambda (k v skip) > (when (negative? v) (skip)) > (square v)) > (fxmapping 0 2 1 -4 2 8)) Thanks, I understand now. > But as it does not mimic some legacy API, it won't be a good idea to > establish a flawed version (the one that handles #f specifically), I think. I'm thinking that I'll just remove it, because the Right Thing is going to take more research. filter-map is related to the (deleted) fxmapping-partition-map, which, as you've mentioned, seemed to be a special case of some more general form for mapping a fxmapping into a number of new fxmappings. With filter-map, we also have the option of discarding associations, which is just another continuation: (fxmapping-filter/partition-map ; silly sample name (lambda (k v insert1 insert2 ... skip) ...) fxmap) It's worth figuring out how this could work, but I'd like to do that outside of the context of SRFI 224. -- Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz> "Heresy is a cradle; orthodoxy, a coffin. Why should man be afraid to think, and why should he fear to express his thoughts?" --Robert G. Ingersoll