As a side note on naming, I think `fxmapping-accumulate' is a
good name; the only concern I have about it is that the very well-known
SICP used it to describe a fold procedure.
There is another issue I've found with replacing Maybe or the
"expected tail-call" semantics in fxmapping-update. Consider this
silly example:
(fxmapping-update key
fxmap
(lambda (k v replace delete) ; updater
(values 'deleted (delete))))
This must be valid if we state that invoking `delete' returns the
updated fxmapping. However, I believe that this constrains
fxmapping-update to calling the updater procedure in tail-context,
which may be inconvenient for some implementations (i.e. those
using structures which are naturally constructed via recursion).
We have discussed a similar thing some time ago, haven't we?
Isn't it a good idea to specify that the update procedure is always called in tail-context?
Example:
(define alist-update
(lambda (ls key updater)
(call-with-prompt (default-prompt-tag)
(lambda ()
(let f ([ls ls])
(cond
[(null? ls) '()]
[(eqv? (caar ls) key)
(abort-to-prompt default-prompt-tag ls)]
[else (cons (car ls) (f (cdr ls)))])))
(lambda (k)
(updater (caar ls) (cdar ls)
(lambda (val)
(k (cons (cons key val) (cdr ls))))
(lambda ()
(k (cdr ls))))))))