On Wednesday, April 26, 2017 at 12:12:26 PM UTC+8, David K. Storrs wrote:

> I could do it with a parameter but that's only sweeping the above ugliness 
> under the rug:
> (define conf (make-parameter #f))
> (define (read-conf)
>    (or (conf)
>          (begin
>            (conf (with-input-from-file "db.conf" (thunk (read-json))))
>            (conf))))

This is probably the wrong way, as the parameter will only be set in the 
current thread.  The code will read the contents of "db.conf" in every thread 
that `read-conf` is called.

Best Regards,

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to