Consolidated response before finalization John Cowan (10 Jul 2020 03:23 UTC)
Re: Consolidated response before finalization Bradley Lucier (10 Jul 2020 18:29 UTC)
Re: Consolidated response before finalization Bradley Lucier (10 Jul 2020 20:33 UTC)
Re: Consolidated response before finalization Arvydas Silanskas (10 Jul 2020 20:49 UTC)
Which notation is better? Bradley Lucier (10 Jul 2020 20:55 UTC)
Re: Consolidated response before finalization Linas Vepstas (10 Jul 2020 18:36 UTC)
Re: Consolidated response before finalization Linas Vepstas (10 Jul 2020 18:46 UTC)
Re: Consolidated response before finalization Arvydas Silanskas (10 Jul 2020 19:38 UTC)
Re: Consolidated response before finalization Linas Vepstas (10 Jul 2020 20:12 UTC)

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)))))