Created
June 17, 2014 09:11
-
-
Save bracki/0866531f6db4f5256151 to your computer and use it in GitHub Desktop.
Clojure/Scala Interop
This file contains hidden or 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
(defn scala-function1 [f] | |
"Convert a one-argument Clojure function to a scala.Function1." | |
(reify scala.Function1 | |
(apply [_ x] (f x)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment