Created
April 8, 2012 05:50
-
-
Save amalloy/2335054 to your computer and use it in GitHub Desktop.
This file contains 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> (import '(java.io ByteArrayInputStream ByteArrayOutputStream ObjectInputStream ObjectOutputStream)) | |
java.io.ObjectOutputStream | |
user> (false? (-> (ByteArrayOutputStream.) | |
(doto (-> (ObjectOutputStream.) (.writeObject false))) | |
(.toByteArray) | |
(ByteArrayInputStream.) | |
(ObjectInputStream.) | |
(.readObject))) | |
false | |
user> (def f (-> (ByteArrayOutputStream.) | |
(doto (-> (ObjectOutputStream.) (.writeObject false))) | |
(.toByteArray) | |
(ByteArrayInputStream.) | |
(ObjectInputStream.) | |
(.readObject))) | |
#'user/f | |
user> (false? f) | |
true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment