wubbie <sunj...@gmail.com> writes:

> @mire.rooms/*rooms* is new to me.
> could anybody explain to me?

Sure thing. *rooms* is a ref in the mire.rooms namespace. So since we
haven't used "refer" or "use" to draw all everything from mire.rooms
into the current namespace, we prefix the var with its namespace to
refer to it. And then the "@" before it simply means deref.

In summary: get the value of the ref named *rooms* in the mire.rooms
namespace.

>     (binding [*name* (read-name)
>               *inventory* (ref [])
>               *current-room* (ref (@mire.rooms/*rooms* :start))]

In this case *rooms* is a ref that refers to a map, so we're looking up
:start in that map and setting the *current-room* ref to that value.

-Phil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to