guix-devel
[Top][All Lists]
Advanced

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

Re: Adding wc to Bournish


From: Thompson, David
Subject: Re: Adding wc to Bournish
Date: Fri, 27 May 2016 11:32:56 -0400

On Fri, May 27, 2016 at 11:28 AM, Taylan Ulrich Bayırlı/Kammer
<address@hidden> 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



reply via email to

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