[racket] Tiny question: Indent `for/fold'

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Sep 17 21:57:59 EDT 2012

I consider this a bug in DrRacket, but haven't had time to look into it.

Robby

On Mon, Sep 17, 2012 at 3:27 PM, Greg Hendershott
<greghendershott at gmail.com> wrote:
> A tiny, not very important question:
>
> 1. for/fold documentation:
>
> (for/fold ([sum 0]
>            [rev-roots null])
>           ([i '(1 2 3 4)])
>   (values (+ sum i) (cons (sqrt i) rev-roots)))
>
> 2. emacs default indent:
>
> (for/fold ([sum 0]
>            [rev-roots null])
>     ([i '(1 2 3 4)])
>   (values (+ sum i) (cons (sqrt i) rev-roots)))
>
> 3. DrRacket default indent:
>
> (for/fold ([sum 0]
>            [rev-roots null])
>   ([i '(1 2 3 4)])
>   (values (+ sum i) (cons (sqrt i) rev-roots)))
>
> I prefer 1. I don't hate 2 but sometimes wonder if I should hand
> indent it to 1, or, if is there some magic N for "(put 'for/fold
> 'scheme-indent-function N)" in emacs that I haven't discovered yet.
>
> I'm curious what other people do? (I suppose "not care" is one valid choice?)
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.