(ns clojure.examples.hello (:gen-class)) (defn getIntegral [fun h] (def memFun (memoize (fn [x] ;(print ".") (if (< x 0) 0 (+ (memFun (- x h)) (* (fun x) h))))))) (defn fun [x] x) (def getInt (getIntegral fun 0.05)) (println (getInt 10)) (println (getInt 9.9))
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more