Skip to content

Instantly share code, notes, and snippets.

@bracki
Created June 17, 2014 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bracki/0866531f6db4f5256151 to your computer and use it in GitHub Desktop.
Save bracki/0866531f6db4f5256151 to your computer and use it in GitHub Desktop.
Clojure/Scala Interop
(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