Re: Okay, more distributions will be fine after all
Bradley Lucier 11 Jul 2020 20:45 UTC
On 7/10/20 8:19 PM, John Cowan wrote:
> 3) At present, with-random-source has the form (w-r-s source proc args),
> which was meant to be a drop-in replacement for allowing the other
> procedures to take a source argument.
>
> But perhaps it should be (w-r-s source . body)? In the single-procedure
> case, that would still be only (w-r-s source (proc args)).
>
> Alternatively, and even more flexibly, it could be a procedure (w-r-s
> source thunk), in which case our single-procedure case would be (w-r-s
> source (lambda () (proc args)).
>
>
> What do people think of these alternatives?
All the other (with-... ) forms I know take a thunk.
That being said, the current version *can* take a thunk, passing a
procedure without any arguments:
(with-random-source source thunk)
I can't think of other considerations.
Brad