Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe (20 Jun 2021 21:58 UTC)
Re: Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe (21 Jun 2021 00:55 UTC)
Re: Failure continuations for fxmapping-update and friends Marc Nieper-Wißkirchen (21 Jun 2021 05:17 UTC)
Re: Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe (21 Jun 2021 16:11 UTC)
Re: Failure continuations for fxmapping-update and friends Marc Nieper-Wißkirchen (21 Jun 2021 17:52 UTC)
Re: Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe (21 Jun 2021 18:37 UTC)
Re: Failure continuations for fxmapping-update and friends Marc Nieper-Wißkirchen (21 Jun 2021 19:22 UTC)
Re: Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe (21 Jun 2021 19:35 UTC)
Re: Failure continuations for fxmapping-update and friends Marc Nieper-Wißkirchen (21 Jun 2021 20:13 UTC)
Re: Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe (21 Jun 2021 20:32 UTC)
Re: Failure continuations for fxmapping-update and friends Marc Nieper-Wißkirchen (21 Jun 2021 20:52 UTC)
Re: Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe (22 Jun 2021 01:26 UTC)
Re: Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe (22 Jun 2021 01:44 UTC)
Re: Failure continuations for fxmapping-update and friends Marc Nieper-Wißkirchen (22 Jun 2021 05:41 UTC)
Re: Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe (22 Jun 2021 17:10 UTC)
Re: Failure continuations for fxmapping-update and friends Marc Nieper-Wißkirchen (24 Jun 2021 14:17 UTC)

Re: Failure continuations for fxmapping-update and friends Wolfgang Corcoran-Mathe 21 Jun 2021 20:31 UTC

On 2021-06-21 22:12 +0200, Marc Nieper-Wißkirchen wrote:
> Am Mo., 21. Juni 2021 um 21:35 Uhr schrieb Wolfgang Corcoran-Mathe <
> xxxxxx@sigwinch.xyz>:
> >
> > Is there a use-case for a success continuation that you think is
> > compelling?  It seems somewhat extraneous in both contexts.  The
> >
>
> [snip]
>
> Without the SUCCESS argument, you would have to code something ugly like:
>
> (call/cc
>   (lambda (c)
>     (let-values (((k v)
>                   (fxmapping-find (lambda (k v) (positive? v))
>                                   fxmap
>                                   (lambda () (c #f)))))
>       (list k v))))

Yes, I agree that it's (unfortunately) pretty clumsy to work with
multiple returns, and that we can clean this up with a success
procedure.  So I'm thinking that fxmapping-find should have this.

It's less clear why (single-valued) fxmapping-ref should have a
'success' argument, but I'll leave it alone at this point.

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

"Simplicity does not precede complexity, but follows it."
--Alan J. Perlis