From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: Re: Adding wc to Bournish Date: Fri, 27 May 2016 11:32:56 -0400 Message-ID: References: <20160524184720.GA27449@debian-netbook> <20160526192755.GB28047@debian-netbook> <87oa7rjzaz.fsf@T420.taylan> 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]:59716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6Jky-00034T-6M for guix-devel@gnu.org; Fri, 27 May 2016 11:33:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6Jkv-00014S-Qk for guix-devel@gnu.org; Fri, 27 May 2016 11:32:59 -0400 Received: from mail-yw0-x229.google.com ([2607:f8b0:4002:c05::229]:33247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6Jkv-00014A-I4 for guix-devel@gnu.org; Fri, 27 May 2016 11:32:57 -0400 Received: by mail-yw0-x229.google.com with SMTP id h19so109347284ywc.0 for ; Fri, 27 May 2016 08:32:57 -0700 (PDT) In-Reply-To: <87oa7rjzaz.fsf@T420.taylan> 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: =?UTF-8?B?VGF5bGFuIFVscmljaCBCYXnEsXJsxLEvS2FtbWVy?= Cc: guix-devel On Fri, May 27, 2016 at 11:28 AM, Taylan Ulrich Bay=C4=B1rl=C4=B1/Kammer wrote: > By the way, I prefer SRFI-11 let-values (standardized in R7RS): > > (define (wc-command file) > (let-values (((lines words chars) > (call-with-input-file file lines+chars))) > ...)) > > The large number of parentheses involved are annoying at first, but as I > used it more often I grew accustomed to it and aren't bothered at all > anymore, neither in writing nor reading the code. I also had some valid > uses of let*-values occasionally; I find it neat how it allows "piping" > a number of different values through a sequence of procedures, without > having to allocate any intermediate data structures. I second this. I got very good mileage out of let*-values while making my game for the last Lisp Game Jam. https://git.dthompson.us/lisp-game-jam-2016-spring.git/blob/HEAD:/lisparuga= /world.scm#l273 - Dave