(name . bug-guix)(address . bug-guix@gnu.org)
Hi,
Putting the following definition into a file a.scm (from
(define (find-latest-release releases)
(fold (match-lambda*
(((key . value) result)
(cond ((even-minor-version? key)
(match result
(#f
(cons key value))
((newest . _)
(if (version>? key newest)
(cons key value)
result))))
(else
result))))
#f
releases))
and running "guix style -f a.scm" on it, it becomes
(define (find-latest-release releases)
(fold (match-lambda* (((key . value) result)
(cond
((even-minor-version? key)
(match result
(#f (cons key value))
((newest . _) (if (version>? key newest)
(cons key value) result))))
(else result)))
) #f releases)).
In particular, note the ") #f releases" -- IMO ) should be on the
previous line, after (else result))), to avoid lonely parentheses and to
align the arguments of 'fold'.
Greetings,
Maxime.