Closed jackfirth closed 1 year ago
Saw this code today:
(string-append " | Package: " (string-join (map ~a from-pkgs) ", "))
The outer string-append can be removed by using the #:before-first keyword argument of string-join like this:
string-append
#:before-first
string-join
(string-join (map ~a from-pkgs) ", " #:before-first " | Package: ")
This is easier to understand and makes it easy to fit on one line if the expressions are small. Resyntax should suggest using #:before-first and #:after-last instead of using string-append in this manner.
#:after-last
Saw this code today:
The outer
string-append
can be removed by using the#:before-first
keyword argument ofstring-join
like this:This is easier to understand and makes it easy to fit on one line if the expressions are small. Resyntax should suggest using
#:before-first
and#:after-last
instead of usingstring-append
in this manner.