On May 15, 7:26 pm, Ken Wesson <kwess...@gmail.com> wrote: > Instance one is right near the end of section 2.9.1: > > "This is because report-ns exists in the joy.ch1 namespace and ..." > > The correct namespace name is joy.ch2. > > Instance two is in 2.9.4: > > "It should be noted that :rename also works with the :use directive." > > This doesn't seem to be true, at least not for clojure 1.2.0 and the > use function: > > user=> (use 'clojure.string :rename '{replace sreplace reverse sreverse}) > #<CompilerException java.lang.Exception: Unsupported option(s) > supplied: :rename (NO_SOURCE_FILE:0)>
This works fine. Each argument to use is either a namespace symbol, or a list of some kind, representing a namespace and options for its use. user> (use '[clojure.string :rename {replace sreplace reverse sreverse}]) nil user> sreplace #<string$replace clojure.string$replace@d09341> -- 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 Note that posts from new members are moderated - please be patient with your first post. 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