Skip to content

Instantly share code, notes, and snippets.

@jurrchen
Created August 13, 2010 21:35
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 jurrchen/523579 to your computer and use it in GitHub Desktop.
Save jurrchen/523579 to your computer and use it in GitHub Desktop.
(defn gen-generic [generic types & args]
(if args
(clojure.lang.GenGeneric/Create generic types (vec args))
(clojure.lang.GenGeneric/Create generic types [])))
(defn gen-generic-method [callsite method types & args]
(let [argv (if args
(vec args)
[])]
(if (= (.GetType callsite) System.RuntimeType)
(clojure.lang.GenGenericMethod/CreateStatic callsite method types argv)
(clojure.lang.GenGenericMethod/Create callsite method types argv))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment