Re: Usecase: chaining operations after "optionals" Arne Babenhauserheide 10 Jun 2020 09:16 UTC

Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> writes:
> Yes, you are right in case `#f' is a valid value in your association list.
> If this is the case, you can code it in a data-driven style with SRFI 189:
>
> (define (assoc-ref key alist)
>   (maybe-bind (list->maybe (assoc key alist)) cdr))
>
> It returns either a Nothing or Just the associated value.

Can Nothing be part of an alist?

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken