Which notation is better? Bradley Lucier 10 Jul 2020 20:54 UTC

I guess a natural question is which of the following two notations is
more natural.

(The first is incorrect according to the current SRFI, but what I
thought with-random-source did; the latter is correct.)

Brad

> (define (make-servers N mean)
>    (let ((result (make-vector N)))
>      (do ((i 0 (fx+ i 1)))
>          ((fx= i N) result)
>        (vector-set! result
>                     i
>                     (with-random-source (sources)
>                                         (make-exponential-generator
> mean))))))

versus

> (define (make-servers N mean)
>    (let ((result (make-vector N)))
>      (do ((i 0 (fx+ i 1)))
>          ((fx= i N) result)
>        (vector-set! result
>                     i
>                     (with-random-source (sources)
>                                         make-exponential-generator
> mean)))))