Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
^Cambrose@ambrose-VirtualBox:~/Projects/no.disassemble$ lein repl
nREPL server started on port 36253 on host 127.0.0.1
REPL-y 0.3.0
Clojure 1.4.0
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=> (defprotocol Foo (bar [this]))
Foo
user=> (extend-type (Class/forName "[java.lang.Object;") Foo (bar [this] 'object-array))
ClassNotFoundException [java/lang/Object; java.lang.Class.forName0 (Class.java:-2)
user=> (extend-type (Class/forName "[Ljava.lang.Object;") Foo (bar [this] 'object-array))
nil
user=> (bar (object-array []))
VerifyError (class: user$eval1137, method: invoke signature: ()Ljava/lang/Object;) Incompatible object argument for function call java.lang.Class.getDeclaredConstructors0 (Class.java:-2)
user=> *clojure-version*
{:major 1, :minor 4, :incremental 0, :qualifier nil}
user=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.