cache for storing original functions which have been patched
cache for storing original functions which have been patched
(list-patched)
returns all functions that have been patched
(patch #'hara.core.base.check/double? hara.core.base.check/double?)
(-> (list-patched) (get #'hara.core.base.check/double?) boolean) => true
returns all functions that have been patched (patch #'hara.core.base.check/double? hara.core.base.check/double?) (-> (list-patched) (get #'hara.core.base.check/double?) boolean) => true
(patch var f)
patches the existing function with a given one
(patch #'hara.core.base.check/double? (fn [x] (instance? Float x)))
(hara.core.base.check/double? (float 1.0)) => true
patches the existing function with a given one (patch #'hara.core.base.check/double? (fn [x] (instance? Float x))) (hara.core.base.check/double? (float 1.0)) => true
(patched? var)
checks if an existing function has been patched
(patched? #'hara.core.base.check/double?) => true
checks if an existing function has been patched (patched? #'hara.core.base.check/double?) => true
(unpatch var)
removes the patch creates for the var
(unpatch #'hara.core.base.check/double?)
(hara.core.base.check/double? (float 1.0)) => false
removes the patch creates for the var (unpatch #'hara.core.base.check/double?) (hara.core.base.check/double? (float 1.0)) => false
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close