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 number...

  • constantly

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

  • defn

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

  • defn-

    same as defn, yielding non-public def

  • fn

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

  • 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 additional...

  • 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 JavaScript compatible 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 s...

  • 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 number...

  • 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 opposite...

  • completing

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

  • every-pred

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

  • 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 numb...

  • memoize

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

  • some-fn

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

  • trampoline

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

  • fn?

    Return true if f is a JavaScript function or satisfies the Fn protocol.

  • ifn?

    Returns true if f returns true for fn? or satisfies 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 l...

  • ->>

    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 lis...

  • as->

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

  • cond->

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

  • cond->>

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

  • 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