Skip to content

Instantly share code, notes, and snippets.

@dsedivec
Created January 5, 2011 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsedivec/765957 to your computer and use it in GitHub Desktop.
Save dsedivec/765957 to your computer and use it in GitHub Desktop.
use with :as and :only
user=> replace
#<core$replace clojure.core$replace@175bc6c8>
user=> split
java.lang.Exception: Unable to resolve symbol: split in this context (NO_SOURCE_FILE:0)
user=> (use '[clojure.string :as s :only (replace split)])
WARNING: replace already refers to: #'clojure.core/replace in namespace: user, being replaced by: #'clojure.string/replace
nil
user=> replace
#<string$replace clojure.string$replace@4245c97b>
user=> split
#<string$split clojure.string$split@6986dda3>
user=> s/replace
#<string$replace clojure.string$replace@4245c97b>
user=> s/split
#<string$split clojure.string$split@6986dda3>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment