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 builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |