[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#36919] [PATCH 1/2] gnu-maintenance: KDE updater no longer relies on
[bug#36919] [PATCH 1/2] gnu-maintenance: KDE updater no longer relies on FTP access.
Tue, 27 Aug 2019 10:30:32 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
thanks for the coding advice. This was what I've been asking for :-)
Just one point:
Am 17.08.19 um 23:01 schrieb Ludovic Courtès:
> As a rule of thumb we don’t use ‘set!’ in Guix, except in special
> circumstances. In this case you can write:
> (define (canonicalize-path path)
> (cond ((string-prefix? …)
> (string-drop path 17))
> ((string-suffix? …)
> (string-drop-right path 1))
AFAIK, `cond` only processes the first expression where `test ` is true.
In this case, we need to process *all* cases where the test is true.
This means we need to nest the evaluation, which is ugly and hard to
read IMHO. Is there some more "linear" syntax?
(BTW: The manual  is not quite precise on `cond`, so I needed to test
it. Maybe I did it wrong.)
| Hartmut Goebel | address@hidden |
| www.crazy-compilers.com | compilers which you thought are impossible |