Skip to content

Instantly share code, notes, and snippets.

@brentonashworth
Created March 26, 2011 05:56
Show Gist options
  • Save brentonashworth/888055 to your computer and use it in GitHub Desktop.
Save brentonashworth/888055 to your computer and use it in GitHub Desktop.
user=> (use 'leibniz.derivative)
nil
user=> (def y '(* (+ (* 3 ?x) 4) (+ (* 4 ?x) 6)))
#'user/y
user=> (def fy (f [?x] y))
#'user/fy
user=> (fy 7)
850
user=> (deriv y ?x)
(+ (* 24 ?x) 34)
user=> (def dydx (f [?x] *1))
#'user/dydx
user=> (dydx 7)
202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment