guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding wc to Bournish


From: Ricardo Wurmus
Subject: Re: Adding wc to Bournish
Date: Wed, 25 May 2016 11:03:34 +0200

Efraim Flashner <address@hidden> writes:

> +(define (wc-command file)
> +  (if (and (file-exists? file) (access? file 4))
> +     (let* ((wc-l ((@@ (guix build bournish) wc-l-command) file))
> +            (wc-w ((@@ (guix build bournish) wc-w-command) file))
> +            (wc-c ((@@ (guix build bournish) wc-c-command) file)))
> +       (begin 
> +         (display wc-l)(display #\space)
> +         (display wc-w)(display #\space)
> +         (display wc-c)(display #\space)
> +         (display file)
> +         (newline)))))

Have you considered using “format” instead of “display”?  The last
“begin” could just be this:

  (format #t "~a ~a ~a ~a\n"
    wc-l wc-w wc-c file)

or

  (format #t "~{~a ~}\n"
    (list wc-l wc-w wc-c file))

Why is it necessary to do “(@@ (guix build bournish) ...)”?  Can it not
be imported once?

~~ Ricardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]