Usecase: chaining operations after "optionals"
Arne Babenhauserheide 09 Jun 2020 17:18 UTC
Hi,
I’ve long had a usecase without a good solution: chaining an operation
after assoc.
Would this work?
(and-> (assoc 'foo '((foo . bar)))
symbol->string)
The result would be "bar" in this case, but in the other case
(and-> (assoc 'foo '((something . else)))
symbol->string)
the result would be #f without ever calling symbol->string.
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken