[racket] Tiny question: Indent `for/fold'
Put the let bindings on one line.
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
--
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE