Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Clojure 1.5.1
- ;; Switching to namespaces-example namespace
- nil
- nil
- => (require 'clojure.set)
- nil
- => (clojure.set/union #{1 2} #{3 4})
- #{1 2 3 4}
- => (require '[clojure.set :as s])
- nil
- => (s/union #{:a :b} #{:c :d})
- #{:a :c :b :d}
- => (use 'clojure.java.io)
- nil
- => (ns-publics 'clojure.java.io)
- {output-stream #'clojure.java.io/output-stream, copy #'clojure.java.io/copy, file #'clojure.java.io/file, writer #'clojure.java.io/writer, as-relative-path #'clojure.java.io/as-relative-path, make-output-stream #'clojure.java.io/make-output-stream, make-parents #'clojure.java.io/make-parents, reader #'clojure.java.io/reader, default-streams-impl #'clojure.java.io/default-streams-impl, delete-file #'clojure.java.io/delete-file, as-file #'clojure.java.io/as-file, resource #'clojure.java.io/resource, input-stream #'clojure.java.io/input-stream, Coercions #'clojure.java.io/Coercions, make-input-stream #'clojure.java.io/make-input-stream, make-writer #'clojure.java.io/make-writer, as-url #'clojure.java.io/as-url, make-reader #'clojure.java.io/make-reader, IOFactory #'clojure.java.io/IOFactory}
- => (keys (ns-publics 'clojure.java.io))
- (output-stream copy file writer as-relative-path make-output-stream make-parents reader default-streams-impl delete-file as-file resource input-stream Coercions make-input-stream make-writer as-url make-reader IOFactory)
- => (dir clojure.java.io)
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (dir 'clojure.java.io)
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (dir clojure.java.io)
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (dir '[clojure.java.io])
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (dir ('clojure.java.io))
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (doc delete-file)
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1)
- (use 'clojure.java.io)
- nil
- => (doc delete-file)
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (use '[clojure.string :only (join)])
- nil
- => join
- #<string$join clojure.string$join@3cd5cdab>
- => (doc join)
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (require '[clojure.string :as str])
- nil
- => (doc str/join)
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (doc (str/join))
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (doc 'str/join)
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (doc '(str/join))
- CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1)
- => (delete-file "C:\\Users\\Bruce\\Documents\\test.txt")
- true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement