Lassi Kortela <xxxxxx@lassi.io> writes:
>>>> (chain (floor/ 5 2)
>>>> (- <2> <1>))
>>
>> It would be possible by replacing `<2>' with `(<> 2)'.
Could <2> not be a shorthand for (<> 2) — for single-digit numbers?
That would give brevity and flexibility.
>> But at least in this case, `(receive (x y) (floor/ 5 2) (- y x))' is
>> much clearer (and no new syntax for Scheme programmers).
>
> +1. We Schemers are already prone to obfuscating our code with "cadr"
> and "cdar" instead of giving clear names to the intermediate things :)
How would this look for three steps? Like this?
(receive (a b) (receive (x y) (floor/ 5 2)
(values (- y x) (+ y x)))
(* a b))
Compared to
(chain (floor/ 5 2)
(- <2> <1>)
(* <1> <2>)
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken