[PRL] Racket module question
Mitchell Wand
wand at ccs.neu.edu
Wed Jun 29 18:08:49 EDT 2011
On Wed, Jun 29, 2011 at 6:06 PM, Matthias Felleisen <matthias at ccs.neu.edu>wrote:
>
> On Jun 29, 2011, at 6:03 PM, Mitchell Wand wrote:
>
> > I've got two different modules (call them A and B) that cooperate by
> manipulating a shared store. The API for the store is provided by a third
> module C.
> >
> > I'm guessing that simply requiring C in both A and B isn't going to
> work, because A and B would be working with different instances of the
> store.
>
>
> You can't possibly mean something like that:
>
> module A:
>
> (require C)
> (set-store 'x 5)
>
> module B:
>
> (require C)
> (displayln (retrieve-store 'x))
>
>
> Because this works just fine.
>
Oh, really? In that case I'm ready to rock&roll.
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the PRL
mailing list