General utility functions.
General utility functions.
(duration d)
Coerce to a Duration
instance.
Coerce to a `Duration` instance.
(qualified-name x)
Given a keyword or symbol, returns the name converted to follow
OpenTelemetry conventions for attribute names; the name is converted to a
snake_case string, where namespace and name are separated by .
. Given any
other type of argument, returns it as a snake_case string.
Given a keyword or symbol, returns the name converted to follow OpenTelemetry conventions for attribute names; the name is converted to a snake_case string, where namespace and name are separated by `.`. Given any other type of argument, returns it as a snake_case string.
(timestamp t)
Coerce Instant
to a vector [amount ^TimeUnit unit]
.
Coerce `Instant` to a vector `[amount ^TimeUnit unit]`.
(biconsumer f)
Returns a BiConsumer
implementation for function f
that takes 2 args
and the result is discarded.
Returns a `BiConsumer` implementation for function `f` that takes 2 args and the result is discarded.
(fn-name)
Returns the name of the currently executing function, using the StackWalker
API first available in Java 9. If StackWalker
is not available, returns
nil; (doto (Throwable.) .fillInStackTrace)
is not used to examine the
stack, as that has poor performance with deep stacks.
Returns the name of the currently executing function, using the StackWalker API first available in Java 9. If `StackWalker` is not available, returns nil; `(doto (Throwable.) .fillInStackTrace)` is not used to examine the stack, as that has poor performance with deep stacks.
(function f)
Returns a Function
implementation for function f
that takes one arg.
Returns a `Function` implementation for function `f` that takes one arg.
(supplier f)
Returns a Supplier
implementation for function f
that takes no args.
Returns a `Supplier` implementation for function `f` that takes no args.
(unwrap-cf-exception e)
Unwraps an exception thrown from a CompletableFuture
.
Unwraps an exception thrown from a `CompletableFuture`.
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 |