Right, waking up a bit. I would like, at some point, to serialize a bunch of structures to a byte stream.
They are the mapped structs (struct :data1 :data2). Lets say I would like to do this generically, I need a function that takes a keyword and returns an integer. I will write out a mapping from integer to name to the file. Next, on deserialize I need to be able to create the keyword again from the name. So I can auto-generate these integers just fine but if there is an internal mapping I might use that. Second, exactly what namespace do :keywords go into? I know ::keywords go into *ns*, but I am not super clear about single-colon keywords. They seem like global keywords which is really what I want for enumerations, but I need to be able to take a string and turn it into the same keyword. Is there a keywords namespace that single colon keywords go into? Chris On Dec 21, 10:51 am, Randall R Schulz <rsch...@sonic.net> wrote: > On Sunday 21 December 2008 09:33, chris wrote: > > > This is not what I would expect: > > > user> (== :test :test) > > false > > user=> (doc ==) > ------------------------- > clojure.core/== > ([x] [x y] [x y & more]) > Returns non-nil if nums all have the same value, otherwise false > > To be clear: == is for numeric values only. > > > ... > > > Also, is there a way to get the numeric value from equals? > > Eh? > > > Chris > > Randall Schulz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---