Skip to main content

Variables

  • alter-var-root

    Atomically alters the root binding of var v by applying f to its current value plus any args

  • alter-var-root

    Atomically alters the root binding of sci var v by applying f to its current value plus any args.

  • bound-fn

    Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the...

  • bound-fn*

    Returns a function, which will install the same bindings in effect as in the thread at the time bound-fn* was called a...

  • declare

    defs the supplied var names with no bindings, useful for making forward declarations.

  • def

    Creates and interns or locates a global var.

  • defonce

    defs name to have the root value of the expr iff the named var has no root value, else expr is unevaluated

  • get-thread-bindings

    Get a map with the Var/value pairs which is currently in effect for the current thread.

  • get-validator

    Gets the validator-fn for a var/ref/agent/atom.

  • intern

    Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting it...

  • intern

    Finds or creates a sci var named by the symbol name in the namespace ns (which can be a symbol or a sci namespace), se...

  • pop-thread-bindings

    Pop one set of bindings pushed with push-binding before. It is an error to pop bindings without pushing before.

  • push-thread-bindings

    WARNING: This is a low-level function. Prefer high-level macros like binding where ever possible. Takes a map of Va...

  • set-validator!

    Sets the validator-fn for a var/ref/agent/atom. validator-fn must be nil or a side-effect-free fn of one argument, whi...

  • var-get

    Gets the value in the var object

  • var-set

    Sets the value in the var object to val. The var must be thread-locally bound.

  • with-bindings

    Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then execu...

  • with-bindings

    Executes body in the context of thread-local bindings for several vars that often need to be set!: *ns* *warn-on-refle...

  • with-bindings

    Macro for binding sci vars. Must be called with map of sci dynamic vars to values. Used in babashka.

  • with-bindings*

    Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then calls...

  • binding

    binding => var-symbol init-expr Creates new bindings for the (already-existing) vars, with the supplied initial val...

  • binding

    Macro for binding sci vars. Must be called with a vector of sci dynamic vars to values.

  • if-let

    bindings => binding-form test If test is true, evaluates then with binding-form bound to the value of test, if not...

  • let

    binding => binding-form init-expr binding-form => name, or destructuring-form destructuring-form => map-destructure-...

  • let

    Macro for building generators using values from other generators. Uses a binding vector with the same syntax as clojur...

  • when-let

    bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test

  • with-local-vars

    varbinding=> symbol init-expr Executes the exprs in a context in which the symbols are bound to vars with per-threa...

  • meta

    Returns the metadata of obj, returns nil if there is no metadata.

  • type

    Returns the :type metadata of x, or its Class if none

  • alter-meta!

    Atomically sets the metadata for a namespace/var/ref/agent/atom to be: (apply f its-current-meta args) f must be f...

  • vary-meta

    Returns an object of the same type and value as obj, with (apply f (meta obj) args) as its metadata.

  • with-meta

    Returns an object of the same type and value as obj, with map m as its metadata.

  • add-tap

    adds f, a fn of one argument, to the tap set. This function will be called with anything sent via tap>. This function ...

  • add-watch

    Adds a watch function to an agent/atom/var/ref reference. The watch fn must be a fn of 4 args: a key, the reference, i...

  • remove-tap

    Remove f from the tap set.

  • remove-watch

    Removes a watch (set by add-watch) from a reference

  • tap>

    sends x to any taps. Will not block. Returns true if there was room in the queue, false if not (dropped).