Does this do what you want?

(defn require-from-string [s]
  (require (symbol s)))

Andy

On Jun 8, 2012, at 5:37 PM, Leandro Oliveira wrote:

> Hi, 
> 
> What is the best way to implement require-from-string?
> 
> Ex:
> 
> # require-from-string words like require but accepts namespaces as strings.
> 
> (def namespace-from-user  (ask-user))
> (require-from-string namespace-from-user)
> 
> # now the namespace chosen by user is loaded. 
> 
>  
> 
> Best regards
> 
> [ ]s
> Leandro.

-- 
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

Reply via email to