Skip to content

Instantly share code, notes, and snippets.

@robertpfeiffer
Created November 10, 2011 12:23
Show Gist options
  • Save robertpfeiffer/1354738 to your computer and use it in GitHub Desktop.
Save robertpfeiffer/1354738 to your computer and use it in GitHub Desktop.
(use 'clojure.algo.generic.arithmetic)
(use '[de.blubberquark.autodiff.core :only [derivative]])
(defn fun [x]
(reduce *
(for [i (range 20)] (+ x(* x i)))))
(fun 3N)
((derivative fun) 3N)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment