From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Adding wc to Bournish Date: Wed, 25 May 2016 11:03:34 +0200 Message-ID: References: <20160524184720.GA27449@debian-netbook> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5UjD-0000Kx-0I for guix-devel@gnu.org; Wed, 25 May 2016 05:03:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5Uj8-00075t-Pn for guix-devel@gnu.org; Wed, 25 May 2016 05:03:45 -0400 In-Reply-To: <20160524184720.GA27449@debian-netbook> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Efraim Flashner Cc: guix-devel@gnu.org Efraim Flashner 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=20 > + (display wc-l)(display #\space) > + (display wc-w)(display #\space) > + (display wc-c)(display #\space) > + (display file) > + (newline))))) Have you considered using =E2=80=9Cformat=E2=80=9D instead of =E2=80=9Cdi= splay=E2=80=9D? The last =E2=80=9Cbegin=E2=80=9D 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 =E2=80=9C(@@ (guix build bournish) ...)=E2=80=9D= ? Can it not be imported once? ~~ Ricardo