Skip to main content

Functions

  • comp

    Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable numb...

  • constantly

    Returns a function that takes any number of arguments and returns x.

  • defn

    Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added...

  • defn-

    same as defn, yielding non-public def

  • fn

    params => positional-params*, or positional-params* & rest-param positional-param => binding-form rest-param => bind...

  • identity

    Returns its argument.

  • partial

    Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of addition...

  • bounded-count

    If coll is counted? returns its count, else will count at most the first n elements of coll using its seq

  • comparator

    Returns an implementation of java.util.Comparator based upon pred.

  • ffirst

    Same as (first (first x))

  • fnext

    Same as (first (next x))

  • iteration

    Creates a seqable/reducible via repeated calls to step, a function of some (continuation token) 'k'. The first call to...

  • max-key

    Returns the x for which (k x), a number, is greatest. If there are multiple such xs, the last one is returned.

  • min-key

    Returns the x for which (k x), a number, is least. If there are multiple such xs, the last one is returned.

  • nfirst

    Same as (next (first x))

  • nnext

    Same as (next (next x))

  • apply

    Applies fn f to the argument list formed by prepending intervening arguments to args.

  • comp

    Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable numb...

  • complement

    Takes a fn f and returns a fn that takes the same arguments as f, has the same effects, if any, and returns the opposi...

  • completing

    Takes a reducing function f of 2 args and returns a fn suitable for transduce by adding an arity-1 signature that call...

  • every-pred

    Takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logic...

  • fnil

    Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x...

  • juxt

    Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable nu...

  • memoize

    Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache...

  • some-fn

    Takes a set of predicates and returns a function f that returns the first logical true value returned by one of its co...

  • trampoline

    trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with suppli...

  • ->PluggableMemoization

    Positional factory function for class clojure.core.memoize.PluggableMemoization.

  • ->RetryingDelay

    Positional factory function for class clojure.core.memoize.RetryingDelay.

  • build-memoizer

    Builds a function that, given a function, returns a pluggable memoized version of it. `build-memoizer` takes a cache...

  • fifo

    Works the same as the basic memoization function (i.e. `memo` and `core.memoize` except when a given threshold is bre...

  • lazy-snapshot

    Returns a lazy snapshot of a core.memo-placed memoization cache. By lazy snapshot you can infer that what you get is...

  • lru

    Works the same as the basic memoization function (i.e. `memo` and `core.memoize` except when a given threshold is bre...

  • lu

    Similar to the implementation of memo-lru, except that this function removes all cache values whose usage value is ...

  • memo

    Used as a more flexible alternative to Clojure's core `memoization` function. Memoized functions built using `memo` ...

  • memo-clear!

    Reaches into an core.memo-memoized function and clears the cache. This is a destructive operation and should be used...

  • memo-fifo

    DEPRECATED: Please use clojure.core.memoize/fifo instead.

  • memo-lru

    DEPRECATED: Please use clojure.core.memoize/lru instead.

  • memo-lu

    DEPRECATED: Please use clojure.core.memoize/lu instead.

  • memo-reset!

    Takes a core.memo-populated function and a map and replaces the memoization cache with the supplied map. This is pot...

  • memo-swap!

    The 2-arity version takes a core.memo-populated function and a map and replaces the memoization cache with the supplie...

  • memo-ttl

    DEPRECATED: Please use clojure.core.memoize/ttl instead.

  • memoized?

    Returns true if a function has an core.memo-placed cache, false otherwise.

  • memoizer

    Build a pluggable memoized version of a function. Given a function and a (pluggable memoized) cache, and an optional s...

  • snapshot

    Returns a snapshot of a core.memo-placed memoization cache. By snapshot you can infer that what you get is only the ...

  • ttl

    Unlike many of the other core.memo memoization functions, `memo-ttl`'s cache policy is time-based rather than algorit...

  • fn?

    Returns true if x implements Fn, i.e. is an object created via fn.

  • ifn?

    Returns true if x implements IFn. Note that many data structures (e.g. sets and maps) implement IFn

  • ->

    Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a...

  • ->>

    Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a ...

  • as->

    Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, r...

  • cond->

    Takes an expression and a set of test/form pairs. Threads expr (via ->) through each form for which the corresponding ...

  • cond->>

    Takes an expression and a set of test/form pairs. Threads expr (via ->>) through each form for which the corresponding...

  • some->

    When expr is not nil, threads it into the first form (via ->), and when that result is not nil, through the next etc

  • some->>

    When expr is not nil, threads it into the first form (via ->>), and when that result is not nil, through the next etc