Created
June 29, 2011 19:35
-
-
Save 8th-Light-Blog/1054713 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Blog Title: Clojure Libs and Namespaces: require, use, import, and ns (Part 1) | |
| Author: Colin Jones | |
| Date: December 5th, 2010 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user=> (clojure.string/split "name,address,city,state,zip,email,phone" #",") | |
| java.lang.ClassNotFoundException: clojure.string (NO_SOURCE_FILE:0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user=> (require 'clojure.string) | |
| nil | |
| user=> (clojure.string/split "name,address,city,state,zip,email,phone" #",") | |
| ["name" "address" "city" "state" "zip" "email" "phone"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user=> (require 'clojure.string 'clojure.test) | |
| nil | |
| user=> (clojure.string/join " " ["name" "address" "city" "state" "zip" "email" "phone"]) | |
| "name address city state zip email phone" | |
| user=> (clojure.test/is (= 1 2)) | |
| FAIL in clojure.lang.PersistentList$EmptyList@1 (NO_SOURCE_FILE:10) | |
| expected: (= 1 2) | |
| actual: (not (= 1 2)) | |
| false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user=> (require '[clojure.string :as string]) | |
| nil | |
| user=> (string/capitalize "foo") | |
| "Foo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require ['clojure.string :as 'string]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user=> (require 'clojure.string '[clojure.test :as test]) | |
| nil | |
| user=> (test/is (= 1 1)) | |
| true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user=> (require '(clojure string test)) | |
| nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user=> (require '(clojure [string :as string] test)) | |
| nil | |
| user=> (string/join [1 2 3]) | |
| "123" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user=> (require '[clojure.string :as string] :verbose) | |
| (clojure.core/load "/clojure/string") | |
| (clojure.core/in-ns 'user) | |
| (clojure.core/alias 'string 'clojure.string) | |
| nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment