Re: Failure continuations for fxmapping-update and friends
Wolfgang Corcoran-Mathe 22 Jun 2021 01:44 UTC
On 2021-06-21 07:16 +0200, Marc Nieper-Wißkirchen wrote:
> (2) 'fxmapping-alter' is quite a bit more complicated than
> 'fxmapping-update', so if it is easy to add optional failure and success
> continuation to 'fxmapping-update', I'd rather do this then telling people
> to use 'fxmapping-alter' as a substitute.
I missed a point in here. A success procedure for fxmapping-update
would likely accept the results returned by 'proc' (the "updater"),
correct?
(fxmapping-update (fxmapping 0 'a)
0
(lambda (k v replace delete)
(replace "a"))
(lambda () #f)
fxmapping->alist)
⇒ ((0 . "a"))
This is the only way it makes sense to me, but this is somewhat
different from what mapping-update (SRFI 146) does; there, the
updater is "on the outside", and is invoked on whatever failure
or success returns.
Thanks for all of your continued work on this SRFI.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"To a wise man, the whole earth is open, because the true country of a
virtuous soul is the entire universe." --Democritus