View difference between Paste ID: jf7119QY and qKeRKAk1
SHOW: | | - or go back to the newest paste.
1
;; Clojure 1.5.1
2
;; Switching to namespaces-example namespace
3
nil
4
nil
5
=> (require 'clojure.set)
6
nil
7
=> (clojure.set/union #{1 2} #{3 4})
8
#{1 2 3 4}
9
=> (require '[clojure.set :as s])
10
nil
11
=> (s/union #{:a :b} #{:c :d})
12
#{:a :c :b :d}
13
=> (use 'clojure.java.io)
14
nil
15
=> (ns-publics 'clojure.java.io)
16
{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}
17
=> (keys (ns-publics 'clojure.java.io))
18
(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)
19
=> (dir clojure.java.io)
20
CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1) 
21
=> (dir 'clojure.java.io)
22
CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1) 
23
=> (dir clojure.java.io)
24
CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1) 
25
=> (dir '[clojure.java.io])
26
CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1) 
27
=> (dir ('clojure.java.io))
28
CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:1:1) 
29
=> (doc delete-file)
30
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1) 
31
(use 'clojure.java.io)
32
nil
33
=> (doc delete-file)
34
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1) 
35
=> (use '[clojure.string :only (join)])
36
nil
37
=> join
38
#<string$join clojure.string$join@3cd5cdab>
39
=> (doc join)
40
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1) 
41
=> (require '[clojure.string :as str])
42
nil
43
=> (doc str/join)
44
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1) 
45
=> (doc (str/join))
46
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1) 
47
=> (doc 'str/join)
48
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1) 
49
=> (doc '(str/join))
50
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(NO_SOURCE_PATH:1:1) 
51
=> (delete-file "C:\\Users\\Bruce\\Documents\\test.txt")
52-
true
52+
true
53
=> (join "," ["a" "b"])
54
"a,b"