Limit the number of calls of a function
Limit the number of calls of a function
(allow-one-only-call f k)
For key k
, allow one call only of function f
.
Following calls will throw an exception.
For key `k`, allow one call only of function `f`. Following calls will throw an exception.
(remove-fn-call k)
Removes a call so next allow-one-only-call
will be successful.
Use it when the previous call scope of allow-one-only-call
is lost. Especially useful for tests.
Removes a call so next `allow-one-only-call` will be successful. Use it when the previous call scope of `allow-one-only-call` is lost. Especially useful for tests.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close