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)
> (conf (with-input-from-file "db.conf" (thunk (read-json))))
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.
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
For more options, visit https://groups.google.com/d/optout.