Created
January 22, 2010 15:51
-
-
Save eschulte/283864 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
;; how to use an imperative library (bcel) in clojure | |
(defn list-expand [asm] | |
;; I need a mutable InstructionList | |
(with-local-vars [lst (new InstructionList)] | |
;; Append is an InstructionList method on which alters the calling | |
;; InstructionList through side effects | |
(map #(.append (var-get lst) %) asm) | |
(var-get lst))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment