diff --git a/core/procs.go b/core/procs.go index 67633b88c..2b2979bd6 100644 --- a/core/procs.go +++ b/core/procs.go @@ -47,7 +47,7 @@ const ( PRINT_IF_NOT_NIL ) -const VERSION = "v0.10.2" +const VERSION = "v0.11.0" var internalLibs map[string][]byte diff --git a/docs/joker.core.html b/docs/joker.core.html index 5d63dfd5a..3764e5bd9 100644 --- a/docs/joker.core.html +++ b/docs/joker.core.html @@ -219,6 +219,9 @@

Index

  • chunked-seq?
  • +
  • + class +
  • coll?
  • @@ -291,6 +294,12 @@

    Index

  • defmacro
  • +
  • + defmethod +
  • +
  • + defmulti +
  • defn
  • @@ -450,6 +459,9 @@

    Index

  • get-in
  • +
  • + get-method +
  • group-by
  • @@ -618,6 +630,9 @@

    Index

  • meta
  • +
  • + methods +
  • min
  • @@ -762,6 +777,12 @@

    Index

  • pr-str
  • +
  • + prefer-method +
  • +
  • + prefers +
  • print
  • @@ -861,12 +882,21 @@

    Index

  • refer
  • +
  • + refer-clojure +
  • rem
  • remove
  • +
  • + remove-all-methods +
  • +
  • + remove-method +
  • remove-ns
  • @@ -1164,7 +1194,7 @@

    *1

    v1.0
    
       

    bound in a repl to the most recent value printed

    - source + source
  • *2

    @@ -1172,7 +1202,7 @@

    *2

    v1.0
    
       

    bound in a repl to the second most recent value printed

    - source + source
  • *3

    @@ -1180,7 +1210,7 @@

    *3

    v1.0
    
       

    bound in a repl to the third most recent value printed

    - source + source
  • *assert*

    @@ -1204,7 +1234,7 @@

    *e

    v1.0
    
       

    bound in a repl to the most recent exception caught by the repl

    - source + source
  • *err*

    @@ -1228,7 +1258,7 @@

    *flush-on-newline*

    v1.0
    
       

    When set to true, output will be flushed whenever a newline is printed.

    Defaults to true.

    - source + source
  • *in*

    @@ -1434,7 +1464,7 @@

    alias

    (alias alias namespace-sym)

    Add an alias in the current namespace to another
    namespace. Arguments are two symbols: the alias to be used, and
    the symbolic name of the target namespace. Use :as in the ns macro in preference
    to calling this directly.

    - source + source
  • all-ns

    @@ -1443,7 +1473,7 @@

    all-ns

    (all-ns)

    Returns a sequence of all namespaces.

    - source + source
  • alter-meta!

    @@ -1452,7 +1482,7 @@

    alter-meta!

    (alter-meta! ref f & args)

    Atomically sets the metadata for a namespace/var/atom to be:

    (apply f its-current-meta args)

    f must be free of side-effects

    - source + source
  • and

    @@ -1494,7 +1524,7 @@

    array-map

    (array-map & keyvals)

    Constructs an array-map. If any keys are equal, they are handled as
    if by repeated uses of assoc.

    - source + source
  • as->

    @@ -1503,7 +1533,7 @@

    as->

    (as-> expr name & forms)

    Binds name to expr, evaluates the first form in the lexical context
    of that binding, then binds name to that result, repeating for each
    successive form, returning the result of the last form.

    - source + source
  • assert

    @@ -1513,7 +1543,7 @@

    assert

    (assert x message)

    Evaluates expr and throws an exception if it does not evaluate to
    logical true.

    - source + source
  • assoc

    @@ -1532,7 +1562,7 @@

    assoc-in

    (assoc-in m ks v)

    Associates a value in a nested associative structure, where ks is a
    sequence of keys and v is the new value and returns a new nested structure.
    If any levels do not exist, hash-maps will be created.

    - source + source
  • associative?

    @@ -1541,7 +1571,7 @@

    associative?

    (associative? coll)

    Returns true if coll implements Associative

    - source + source
  • atom

    @@ -1550,7 +1580,7 @@

    atom

    (atom x & options)

    Creates and returns an Atom with an initial value of x and zero or
    more options (in any order):

    :meta metadata-map

    If metadata-map is supplied, it will become the metadata on the
    atom.

    - source + source
  • bigfloat

    @@ -1559,7 +1589,7 @@

    bigfloat

    (bigfloat x)

    Coerce to BigFloat

    - source + source
  • bigfloat?

    @@ -1568,7 +1598,7 @@

    bigfloat?

    (bigfloat? n)

    Returns true if n is a BigFloat

    - source + source
  • bigint

    @@ -1577,7 +1607,7 @@

    bigint

    (bigint x)

    Coerce to BigInt

    - source + source
  • binding

    @@ -1586,7 +1616,7 @@

    binding

    (binding bindings & body)

    binding => var-symbol init-expr

    Creates new bindings for the (already-existing) vars, with the
    supplied initial values, executes the exprs in an implicit do, then
    re-establishes the bindings that existed before. The new bindings
    are made in parallel (unlike let); all init-exprs are evaluated
    before the vars are bound to their new values.

    - source + source
  • bit-and

    @@ -1698,7 +1728,7 @@

    boolean

    (boolean x)

    Coerce to boolean

    - source + source
  • boolean?

    @@ -1716,7 +1746,7 @@

    bound?

    (bound? & vars)

    Returns true if all of the vars provided as arguments have any bound value.
    Implies that deref'ing the provided vars will succeed. Returns true if no vars are provided.

    - source + source
  • bounded-count

    @@ -1725,7 +1755,7 @@

    bounded-count

    (bounded-count n coll)

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

    - source + source
  • butlast

    @@ -1743,7 +1773,7 @@

    callable?

    (callable? x)

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

    - source + source
  • case

    @@ -1752,7 +1782,7 @@

    case

    (case expr & clauses)

    Takes an expression, and a set of clauses.

    Each clause can take the form of either:

    test-expr result-expr

    (test-expr ... test-expr) result-expr

    If the expression is equal to a value of
    test-expr, the corresponding result-expr is returned. A single
    default expression can follow the clauses, and its value will be
    returned if no clause matches. If no default expression is provided
    and no clause matches, an exception is thrown.

    - source + source
  • cast

    @@ -1770,7 +1800,7 @@

    char

    (char x)

    Coerce to char

    - source + source
  • char?

    @@ -1790,6 +1820,15 @@

    chunked-seq?

    Always returns false because chunked sequences are not supported

    source
  • +
  • +

    class

    + Function + v1.0 +
    (class x)
    +
    +

    Returns the Type of x.

    + source +
  • coll?

    Function @@ -1797,7 +1836,7 @@

    coll?

    (coll? x)

    Returns true if x implements Collection

    - source + source
  • comment

    @@ -1806,7 +1845,7 @@

    comment

    (comment & body)

    Ignores body, yields nil

    - source + source
  • comp

    @@ -1819,7 +1858,7 @@

    comp

    (comp f1 f2 f3 & fs)

    Takes a set of functions and returns a fn that is the composition
    of those fns. The returned fn takes a variable number of args,
    applies the rightmost of fns to the args, the next
    fn (right-to-left) to the result, etc.

    - source + source
  • compare

    @@ -1867,7 +1906,7 @@

    cond->

    (cond-> expr & clauses)

    Takes an expression and a set of test/form pairs. Threads expr (via ->)
    through each form for which the corresponding test
    expression is true. Note that, unlike cond branching, cond-> threading does
    not short circuit after the first true test expression.

    - source + source
  • cond->>

    @@ -1876,7 +1915,7 @@

    cond->>

    (cond->> expr & clauses)

    Takes an expression and a set of test/form pairs. Threads expr (via ->>)
    through each form for which the corresponding test expression
    is true. Note that, unlike cond branching, cond->> threading does not short circuit
    after the first true test expression.

    - source + source
  • condp

    @@ -1885,7 +1924,7 @@

    condp

    (condp pred expr & clauses)

    Takes a binary predicate, an expression, and a set of clauses.
    Each clause can take the form of either:

    test-expr result-expr

    test-expr :>> result-fn

    Note :>> is an ordinary keyword.

    For each clause, (pred test-expr expr) is evaluated. If it returns
    logical true, the clause is a match. If a binary clause matches, the
    result-expr is returned, if a ternary clause matches, its result-fn,
    which must be a unary function, is called with the result of the
    predicate as its argument, the result of that call being the return
    value of condp. A single default expression can follow the clauses,
    and its value will be returned if no clause matches. If no default
    expression is provided and no clause matches, an
    exception is thrown.

    - source + source
  • conj

    @@ -1940,7 +1979,7 @@

    counted?

    (counted? coll)

    Returns true if coll implements count in constant time

    - source + source
  • create-ns

    @@ -1949,7 +1988,7 @@

    create-ns

    (create-ns sym)

    Create a new namespace named by the symbol if one doesn't already
    exist, returns it or the already-existing namespace of the same
    name.

    - source + source
  • cycle

    @@ -1958,7 +1997,7 @@

    cycle

    (cycle coll)

    Returns a lazy (infinite!) sequence of repetitions of the items in coll.

    - source + source
  • dec

    @@ -1985,7 +2024,7 @@

    declare

    (declare & names)

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

    - source + source
  • dedupe

    @@ -1994,7 +2033,7 @@

    dedupe

    (dedupe coll)

    Returns a lazy sequence removing consecutive duplicates in coll.

    - source + source
  • default-data-readers

    @@ -2002,7 +2041,7 @@

    default-data-readers

    v1.0
    
       

    Default map of data reader functions provided by Joker. May be
    overridden by binding *data-readers*.

    - source + source
  • defmacro

    @@ -2014,6 +2053,24 @@

    defmacro

    Like defn, but the resulting function name is declared as a
    macro and will be used as a macro by the compiler when it is
    called.

    source
  • +
  • +

    defmethod

    + Macro + v1.0 +
    (defmethod multifn dispatch-val & fn-tail)
    +
    +

    Creates and installs a new method of multimethod associated with dispatch-value.

    + source +
  • +
  • +

    defmulti

    + Macro + v1.0 +
    (defmulti name docstring? attr-map? dispatch-fn & options)
    +
    +

    Creates a new multimethod with the associated dispatch function.
    The docstring and attr-map are optional.

    Options are key-value pairs and may be one of:

    :default

    The default dispatch value, defaults to :default

    :hierarchy (UNSUPPORTED)

    The value used for hierarchical dispatch (e.g. ::square is-a ::shape)

    Hierarchies are type-like relationships that do not depend upon type
    inheritance. By default Clojure's multimethods dispatch off of a
    global hierarchy map. However, a hierarchy relationship can be
    created with the derive function used to augment the root ancestor
    created with make-hierarchy.

    Multimethods expect the value of the hierarchy option to be supplied as
    a reference type e.g. a var (i.e. via the Var-quote dispatch macro #'
    or the var special form).

    + source +
  • defn

    Macro @@ -2031,7 +2088,7 @@

    defn-

    (defn- name & decls)

    same as defn, yielding non-public def

    - source + source
  • defonce

    @@ -2040,7 +2097,7 @@

    defonce

    (defonce name expr)

    defs name to have the value of the expr if the named var is not bound,
    else expr is unevaluated

    - source + source
  • delay

    @@ -2067,7 +2124,7 @@

    denominator

    (denominator r)

    Returns the denominator part of a Ratio.

    - source + source
  • deref

    @@ -2076,7 +2133,7 @@

    deref

    (deref ref)

    Also reader macro: @var/@atom/@delay. When applied to a var or atom,
    returns its current state. When applied to a delay, forces
    it if not already forced.

    - source + source
  • disj

    @@ -2107,7 +2164,7 @@

    distinct

    (distinct coll)

    Returns a lazy sequence of the elements of coll with duplicates removed.

    - source + source
  • distinct?

    @@ -2118,7 +2175,7 @@

    distinct?

    (distinct? x y & more)

    Returns true if no two of the arguments are =

    - source + source
  • doall

    @@ -2128,7 +2185,7 @@

    doall

    (doall n coll)

    When lazy sequences are produced via functions that have side
    effects, any effects other than those needed to produce the first
    element in the seq do not occur until the seq is consumed. doall can
    be used to force any effects. Walks through the successive nexts of
    the seq, retains the head and returns it, thus causing the entire
    seq to reside in memory at one time.

    - source + source
  • dorun

    @@ -2138,7 +2195,7 @@

    dorun

    (dorun n coll)

    When lazy sequences are produced via functions that have side
    effects, any effects other than those needed to produce the first
    element in the seq do not occur until the seq is consumed. dorun can
    be used to force any effects. Walks through the successive nexts of
    the seq, does not retain the head and returns nil.

    - source + source
  • doseq

    @@ -2147,7 +2204,7 @@

    doseq

    (doseq seq-exprs & body)

    Repeatedly executes body (presumably for side-effects) with
    bindings and filtering as provided by "for". Does not retain
    the head of the sequence. Returns nil.

    - source + source
  • dotimes

    @@ -2156,7 +2213,7 @@

    dotimes

    (dotimes bindings & body)

    bindings => name n

    Repeatedly executes body (presumably for side-effects) with name
    bound to integers from 0 through n-1.

    - source + source
  • doto

    @@ -2165,7 +2222,7 @@

    doto

    (doto x & forms)

    Evaluates x then calls all of the methods and functions with the
    value of x supplied at the front of the given arguments. The forms
    are evaluated in order. Returns x.

    - source + source
  • double

    @@ -2174,7 +2231,7 @@

    double

    (double x)

    Coerce to double

    - source + source
  • double?

    @@ -2192,7 +2249,7 @@

    drop

    (drop n coll)

    Returns a lazy sequence of all but the first n items in coll.

    - source + source
  • drop-last

    @@ -2202,7 +2259,7 @@

    drop-last

    (drop-last n s)

    Return a lazy sequence of all but the last n (default 1) items in coll

    - source + source
  • drop-while

    @@ -2211,7 +2268,7 @@

    drop-while

    (drop-while pred coll)

    Returns a lazy sequence of the items in coll starting from the first
    item for which (pred item) returns logical false.

    - source + source
  • empty

    @@ -2220,7 +2277,7 @@

    empty

    (empty coll)

    Returns an empty collection of the same category as coll, or nil

    - source + source
  • empty?

    @@ -2229,7 +2286,7 @@

    empty?

    (empty? coll)

    Returns true if coll has no items - same as (not (seq coll)).
    Please use the idiom (seq x) rather than (not (empty? x))

    - source + source
  • eval

    @@ -2238,7 +2295,7 @@

    eval

    (eval form)

    Evaluates the form data structure (not text!) and returns the result.

    - source + source
  • even?

    @@ -2259,7 +2316,7 @@

    every-pred

    (every-pred p1 p2 p3 & ps)

    Takes a set of predicates and returns a function f that returns true if all of its
    composing predicates return a logical true value against all of its arguments, else it returns
    false. Note that f is short-circuiting in that it will stop execution on the first
    argument that triggers a logical false result against the original predicates.

    - source + source
  • every?

    @@ -2268,7 +2325,7 @@

    every?

    (every? pred coll)

    Returns true if (pred x) is logical true for every x in coll, else
    false.

    - source + source
  • ex-cause

    @@ -2277,7 +2334,7 @@

    ex-cause

    (ex-cause ex)

    Returns the cause of ex if ex is an ExInfo.
    Otherwise returns nil.

    - source + source
  • ex-data

    @@ -2286,7 +2343,7 @@

    ex-data

    (ex-data ex)

    Returns exception data (a map) if ex is an ExInfo.
    Otherwise returns nil.

    - source + source
  • ex-info

    @@ -2305,7 +2362,7 @@

    ex-message

    (ex-message ex)

    Returns the message attached to ex if ex is an ExInfo.
    Otherwise returns nil.

    - source + source
  • false?

    @@ -2332,7 +2389,7 @@

    filter

    (filter pred coll)

    Returns a lazy sequence of the items in coll for which
    (pred item) returns true. pred must be free of side-effects.

    - source + source
  • filterv

    @@ -2341,7 +2398,7 @@

    filterv

    (filterv pred coll)

    Returns a vector of the items in coll for which
    (pred item) returns true. pred must be free of side-effects.

    - source + source
  • find

    @@ -2359,7 +2416,7 @@

    find-ns

    (find-ns sym)

    Returns the namespace named by the symbol or nil if it doesn't exist.

    - source + source
  • find-var

    @@ -2368,7 +2425,7 @@

    find-var

    (find-var sym)

    Returns the global var named by the namespace-qualified symbol, or
    nil if no var with that name.

    - source + source
  • first

    @@ -2386,7 +2443,7 @@

    flatten

    (flatten x)

    Takes any nested combination of sequential things (lists, vectors,
    etc.) and returns their contents as a single, flat sequence.
    (flatten nil) returns an empty sequence.

    - source + source
  • float?

    @@ -2395,7 +2452,7 @@

    float?

    (float? n)

    Returns true if n is a floating point number

    - source + source
  • flush

    @@ -2404,7 +2461,7 @@

    flush

    (flush)

    Flushes the output stream that is the current value of
    *out*

    - source + source
  • fn

    @@ -2414,7 +2471,7 @@

    fn

    (fn name? ([params*] exprs*) +)

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

    Defines a function

    - source + source
  • fn?

    @@ -2423,7 +2480,7 @@

    fn?

    (fn? x)

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

    - source + source
  • fnext

    @@ -2443,7 +2500,7 @@

    fnil

    (fnil f x y z)

    Takes a function f, and returns a function that calls f, replacing
    a nil first argument to f with the supplied value x. Higher arity
    versions can replace arguments in the second and third
    positions (y, z). Note that the function f can take any number of
    arguments, not just the one(s) being nil-patched.

    - source + source
  • for

    @@ -2452,7 +2509,7 @@

    for

    (for seq-exprs body-expr)

    List comprehension. Takes a vector of one or more
    binding-form/collection-expr pairs, each followed by zero or more
    modifiers, and yields a lazy sequence of evaluations of expr.
    Collections are iterated in a nested fashion, rightmost fastest,
    and nested coll-exprs can refer to bindings created in prior
    binding-forms. Supported modifiers are: :let [binding-form expr ...],
    :while test, :when test.

    (take 100 (for [x (range 100000000) y (range 1000000) :while (< y x)] [x y]))

    - source + source
  • force

    @@ -2470,7 +2527,7 @@

    format

    (format fmt & args)

    Formats a string using fmt.Sprintf

    - source + source
  • frequencies

    @@ -2479,7 +2536,7 @@

    frequencies

    (frequencies coll)

    Returns a map from distinct items in coll to the number of times
    they appear.

    - source + source
  • gensym

    @@ -2509,7 +2566,16 @@

    get-in

    (get-in m ks not-found)

    Returns the value in a nested associative structure,
    where ks is a sequence of keys. Returns nil if the key
    is not present, or the not-found value if supplied.

    - source + source +
  • +
  • +

    get-method

    + Function + v1.0 +
    (get-method multifn dispatch-val)
    +
    +

    Given a multimethod and a dispatch value, returns the dispatch fn
    that would apply to that value, or nil if none apply and no default

    + source
  • group-by

    @@ -2518,7 +2584,7 @@

    group-by

    (group-by f coll)

    Returns a map of the elements of coll keyed by the result of
    f on each element. The value at each key will be a vector of the
    corresponding elements, in the order they appeared in coll.

    - source + source
  • hash

    @@ -2527,7 +2593,7 @@

    hash

    (hash x)

    Returns the hash code of its argument.

    - source + source
  • hash-map

    @@ -2611,7 +2677,7 @@

    in-ns

    (in-ns name)

    Sets *ns* to the namespace named by the symbol, creating it if needed.

    - source + source
  • inc

    @@ -2638,7 +2704,7 @@

    indexed?

    (indexed? coll)

    Return true if coll implements Indexed, indicating efficient lookup by index

    - source + source
  • instance?

    @@ -2686,7 +2752,7 @@

    interleave

    (interleave c1 c2 & colls)

    Returns a lazy seq of the first item in each coll, then the second etc.

    - source + source
  • intern

    @@ -2696,7 +2762,7 @@

    intern

    (intern ns name val)

    Finds or creates a var named by the symbol name in the namespace
    ns (which can be a symbol or a namespace), setting its root binding
    to val if supplied. The namespace must exist. The var will adopt any
    metadata from the name symbol. Returns the var.

    - source + source
  • interpose

    @@ -2705,7 +2771,7 @@

    interpose

    (interpose sep coll)

    Returns a lazy seq of the elements of coll separated by sep.
    Returns a stateful transducer when no collection is provided.

    - source + source
  • into

    @@ -2714,7 +2780,7 @@

    into

    (into to from)

    Returns a new coll consisting of to-coll with all of the items of
    from-coll conjoined.

    - source + source
  • iterate

    @@ -2723,7 +2789,7 @@

    iterate

    (iterate f x)

    Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects

    - source + source
  • joker-version

    @@ -2732,7 +2798,7 @@

    joker-version

    (joker-version)

    Returns joker version as a printable string.

    - source + source
  • juxt

    @@ -2744,7 +2810,7 @@

    juxt

    (juxt f g h & fs)

    Takes a set of functions and returns a fn that is the juxtaposition
    of those fns. The returned fn takes a variable number of args, and
    returns a vector containing the result of applying each fn to the
    args (left-to-right).
    ((juxt a b c) x) => [(a x) (b x) (c x)]

    - source + source
  • keep

    @@ -2753,7 +2819,7 @@

    keep

    (keep f coll)

    Returns a lazy sequence of the non-nil results of (f item). Note,
    this means false return values will be included. f must be free of
    side-effects.

    - source + source
  • keep-indexed

    @@ -2762,7 +2828,7 @@

    keep-indexed

    (keep-indexed f coll)

    Returns a lazy sequence of the non-nil results of (f index item). Note,
    this means false return values will be included. f must be free of
    side-effects.

    - source + source
  • key

    @@ -2817,7 +2883,7 @@

    lazy-cat

    (lazy-cat & colls)

    Expands to code which yields a lazy sequence of the concatenation
    of the supplied colls. Each coll expr is not evaluated until it is
    needed.

    (lazy-cat xs ys zs) === (concat (lazy-seq xs) (lazy-seq ys) (lazy-seq zs))

    - source + source
  • lazy-seq

    @@ -2835,7 +2901,7 @@

    let

    (let [bindings*] exprs*)

    binding => binding-form init-expr

    Evaluates the exprs in a lexical context in which the symbols in
    the binding-forms are bound to their respective init-exprs or parts
    therein.

    - source + source
  • list

    @@ -2866,7 +2932,7 @@

    list?

    (list? x)

    Returns true if x is a List

    - source + source
  • load

    @@ -2875,7 +2941,7 @@

    load

    (load & libs)

    Loads code from libs.

    - source + source
  • load-file

    @@ -2884,7 +2950,7 @@

    load-file

    (load-file f)

    Loads code from file f

    - source + source
  • load-string

    @@ -2893,7 +2959,7 @@

    load-string

    (load-string s)

    Sequentially read and evaluate the set of forms contained in the
    string

    - source + source
  • loaded-libs

    @@ -2902,7 +2968,7 @@

    loaded-libs

    (loaded-libs)

    Returns an UNSORTED set of symbols naming the currently loaded libs

    - source + source
  • loop

    @@ -2911,7 +2977,7 @@

    loop

    (loop [bindings*] exprs*)

    Evaluates the exprs in a lexical context in which the symbols in
    the binding-forms are bound to their respective init-exprs or parts
    therein. Acts as a recur target.

    - source + source
  • macroexpand

    @@ -2920,7 +2986,7 @@

    macroexpand

    (macroexpand form)

    Repeatedly calls macroexpand-1 on form until it no longer
    represents a macro form, then returns it. Note neither
    macroexpand-1 nor macroexpand expand macros in subforms.

    - source + source
  • macroexpand-1

    @@ -2929,7 +2995,7 @@

    macroexpand-1

    (macroexpand-1 form)

    If form represents a macro form, returns its expansion, else returns form.

    - source + source
  • map

    @@ -2941,7 +3007,7 @@

    map

    (map f c1 c2 c3 & colls)

    Returns a lazy sequence consisting of the result of applying f to the
    set of first items of each coll, followed by applying f to the set
    of second items in each coll, until any one of the colls is
    exhausted. Any remaining items in other colls are ignored. Function
    f should accept number-of-colls arguments.

    - source + source
  • map-indexed

    @@ -2950,7 +3016,7 @@

    map-indexed

    (map-indexed f coll)

    Returns a lazy sequence consisting of the result of applying f to 0
    and the first item of coll, followed by applying f to 1 and the second
    item in coll, etc, until coll is exhausted. Thus function f should
    accept 2 arguments, index and item.

    - source + source
  • map?

    @@ -2968,7 +3034,7 @@

    mapcat

    (mapcat f & colls)

    Returns the result of applying concat to the result of applying map
    to f and colls. Thus function f should return a collection.

    - source + source
  • mapv

    @@ -2980,7 +3046,7 @@

    mapv

    (mapv f c1 c2 c3 & colls)

    Returns a vector consisting of the result of applying f to the
    set of first items of each coll, followed by applying f to the set
    of second items in each coll, until any one of the colls is
    exhausted. Any remaining items in other colls are ignored. Function
    f should accept number-of-colls arguments.

    - source + source
  • max

    @@ -3002,7 +3068,7 @@

    max-key

    (max-key k x y & more)

    Returns the x for which (k x), a number, is greatest.

    - source + source
  • memoize

    @@ -3011,7 +3077,7 @@

    memoize

    (memoize f)

    Returns a memoized version of a referentially transparent function. The
    memoized version of the function keeps a cache of the mapping from arguments
    to results and, when calls with the same arguments are repeated often, has
    higher performance at the expense of higher memory use.

    - source + source
  • merge

    @@ -3020,7 +3086,7 @@

    merge

    (merge & maps)

    Returns a map that consists of the rest of the maps conj-ed onto
    the first. If a key occurs in more than one map, the mapping from
    the latter (left-to-right) will be the mapping in the result.

    - source + source
  • merge-with

    @@ -3029,7 +3095,7 @@

    merge-with

    (merge-with f & maps)

    Returns a map that consists of the rest of the maps conj-ed onto
    the first. If a key occurs in more than one map, the mapping(s)
    from the latter (left-to-right) will be combined with the mapping in
    the result by calling (f val-in-result val-in-latter).

    - source + source
  • meta

    @@ -3040,6 +3106,15 @@

    meta

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

    source
  • +
  • +

    methods

    + Function + v1.0 +
    (methods multifn)
    +
    +

    Given a multimethod, returns a map of dispatch values -> dispatch fns

    + source +
  • min

    Function @@ -3060,7 +3135,7 @@

    min-key

    (min-key k x y & more)

    Returns the x for which (k x), a number, is least.

    - source + source
  • mod

    @@ -3069,7 +3144,7 @@

    mod

    (mod num div)

    Modulus of num and div. Truncates toward negative infinity.

    - source + source
  • name

    @@ -3123,7 +3198,7 @@

    newline

    (newline)

    Writes a platform-specific newline to *out*

    - source + source
  • next

    @@ -3177,7 +3252,7 @@

    not-any?

    (not-any? pred coll)

    Returns false if (pred x) is logical true for any x in coll,
    else true.

    - source + source
  • not-empty

    @@ -3186,7 +3261,7 @@

    not-empty

    (not-empty coll)

    If coll is empty, returns nil, else coll

    - source + source
  • not-every?

    @@ -3195,7 +3270,7 @@

    not-every?

    (not-every? pred coll)

    Returns false if (pred x) is logical true for every x in
    coll, else true.

    - source + source
  • not=

    @@ -3215,7 +3290,7 @@

    ns

    (ns name docstring? attr-map? references*)

    Sets *ns* to the namespace named by name (unevaluated), creating it
    if needed. references can be zero or more of:
    (:require ...) (:use ...) (:load ...)
    with the syntax of require/use/load
    respectively, except the arguments are unevaluated and need not be
    quoted. Use of ns is preferred to
    individual calls to in-ns/require/use:

    (ns foo.bar
    (:require [my.lib1 :as lib1])
    (:use [my.lib2]))

    - source + source
  • ns-aliases

    @@ -3224,7 +3299,7 @@

    ns-aliases

    (ns-aliases ns)

    Returns a map of the aliases for the namespace.

    - source + source
  • ns-interns

    @@ -3233,7 +3308,7 @@

    ns-interns

    (ns-interns ns)

    Returns a map of the intern mappings for the namespace.

    - source + source
  • ns-map

    @@ -3242,7 +3317,7 @@

    ns-map

    (ns-map ns)

    Returns a map of all the mappings for the namespace.

    - source + source
  • ns-name

    @@ -3251,7 +3326,7 @@

    ns-name

    (ns-name ns)

    Returns the name of the namespace, a symbol.

    - source + source
  • ns-publics

    @@ -3260,7 +3335,7 @@

    ns-publics

    (ns-publics ns)

    Returns a map of the public intern mappings for the namespace.

    - source + source
  • ns-refers

    @@ -3269,7 +3344,7 @@

    ns-refers

    (ns-refers ns)

    Returns a map of the refer mappings for the namespace.

    - source + source
  • ns-resolve

    @@ -3279,7 +3354,7 @@

    ns-resolve

    (ns-resolve ns env sym)

    Returns the var or type to which a symbol will be resolved in the
    namespace (unless found in the environment), else nil. Note that
    if the symbol is fully qualified, the var/Type to which it resolves
    need not be present in the namespace.

    - source + source
  • ns-unalias

    @@ -3288,7 +3363,7 @@

    ns-unalias

    (ns-unalias ns sym)

    Removes the alias for the symbol from the namespace.

    - source + source
  • ns-unmap

    @@ -3297,7 +3372,7 @@

    ns-unmap

    (ns-unmap ns sym)

    Removes the mappings for the symbol from the namespace.

    - source + source
  • nth

    @@ -3316,7 +3391,7 @@

    nthnext

    (nthnext coll n)

    Returns the nth next of coll, (seq coll) when n is 0.

    - source + source
  • nthrest

    @@ -3325,7 +3400,7 @@

    nthrest

    (nthrest coll n)

    Returns the nth rest of coll, coll when n is 0.

    - source + source
  • num

    @@ -3334,7 +3409,7 @@

    num

    (num x)

    Coerce to Number

    - source + source
  • number?

    @@ -3343,7 +3418,7 @@

    number?

    (number? x)

    Returns true if x is a Number

    - source + source
  • numerator

    @@ -3352,7 +3427,7 @@

    numerator

    (numerator r)

    Returns the numerator part of a Ratio.

    - source + source
  • odd?

    @@ -3385,7 +3460,7 @@

    partial

    (partial f arg1 arg2 arg3 & more)

    Takes a function f and fewer than the normal arguments to f, and
    returns a fn that takes a variable number of additional args. When
    called, the returned function calls f with args + additional args.

    - source + source
  • partition

    @@ -3396,7 +3471,7 @@

    partition

    (partition n step pad coll)

    Returns a lazy sequence of lists of n items each, at offsets step
    apart. If step is not supplied, defaults to n, i.e. the partitions
    do not overlap. If a pad collection is supplied, use its elements as
    necessary to complete last partition upto n items. In case there are
    not enough padding elements, return a partition with less than n items.

    - source + source
  • partition-all

    @@ -3406,7 +3481,7 @@

    partition-all

    (partition-all n step coll)

    Returns a lazy sequence of lists like partition, but may include
    partitions with fewer than n items at the end.

    - source + source
  • partition-by

    @@ -3415,7 +3490,7 @@

    partition-by

    (partition-by f coll)

    Applies f to each value in coll, splitting it each time f returns a
    new value. Returns a lazy seq of partitions.

    - source + source
  • peek

    @@ -3460,7 +3535,7 @@

    pprint

    (pprint x)

    Pretty prints x to the output stream that is the current value of *out*.

    - source + source
  • pr

    @@ -3469,7 +3544,7 @@

    pr

    (pr & args)

    Prints the object(s) to the output stream that is the current value
    of *out*. Prints the object(s), separated by spaces if there is
    more than one. By default, pr and prn print in a way that objects
    can be read by the reader

    - source + source
  • pr-err

    @@ -3478,7 +3553,7 @@

    pr-err

    (pr-err & xs)

    pr to *err*

    - source + source
  • pr-str

    @@ -3487,7 +3562,25 @@

    pr-str

    (pr-str & xs)

    pr to a string, returning it

    - source + source +
  • +
  • +

    prefer-method

    + Function + v1.0 +
    (prefer-method multifn dispatch-val-x dispatch-val-y)
    +
    +

    Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y
    when there is a conflict

    + source +
  • +
  • +

    prefers

    + Function + v1.0 +
    (prefers multifn)
    +
    +

    Given a multimethod, returns a map of preferred value -> set of other values

    + source
  • print

    @@ -3496,7 +3589,7 @@

    print

    (print & more)

    Prints the object(s) to the output stream that is the current value
    of *out*. print and println produce output for human consumption.

    - source + source
  • @@ -3505,7 +3598,7 @@
    (print-err & xs)

    print to *err*

    - source + source
  • @@ -3514,7 +3607,7 @@
    (print-str & xs)

    print to a string, returning it

    - source + source
  • printf

    @@ -3523,7 +3616,7 @@

    printf

    (printf fmt & args)

    Prints formatted output, as per format

    - source + source
  • println

    @@ -3532,7 +3625,7 @@

    println

    (println & more)

    Same as print followed by (newline)

    - source + source
  • println-err

    @@ -3541,7 +3634,7 @@

    println-err

    (println-err & xs)

    println to *err*

    - source + source
  • println-str

    @@ -3550,7 +3643,7 @@

    println-str

    (println-str & xs)

    println to a string, returning it

    - source + source
  • prn

    @@ -3559,7 +3652,7 @@

    prn

    (prn & more)

    Same as pr followed by (newline). Observes *flush-on-newline*

    - source + source
  • prn-err

    @@ -3568,7 +3661,7 @@

    prn-err

    (prn-err & xs)

    prn to *err*

    - source + source
  • prn-str

    @@ -3577,7 +3670,7 @@

    prn-str

    (prn-str & xs)

    prn to a string, returning it

    - source + source
  • qualified-ident?

    @@ -3623,7 +3716,7 @@

    rand

    (rand n)

    Returns a random floating point number between 0 (inclusive) and
    n (default 1) (exclusive).

    - source + source
  • rand-int

    @@ -3632,7 +3725,7 @@

    rand-int

    (rand-int n)

    Returns a random integer between 0 (inclusive) and n (exclusive).

    - source + source
  • rand-nth

    @@ -3641,7 +3734,7 @@

    rand-nth

    (rand-nth coll)

    Return a random element of the (sequential) collection. Will have
    the same performance characteristics as nth for the given
    collection.

    - source + source
  • random-sample

    @@ -3650,7 +3743,7 @@

    random-sample

    (random-sample prob coll)

    Returns items from coll with random probability of prob (0.0 -
    1.0).

    - source + source
  • range

    @@ -3662,7 +3755,7 @@

    range

    (range start end step)

    Returns a lazy seq of nums from start (inclusive) to end
    (exclusive), by step, where start defaults to 0, step to 1, and end to
    infinity. When step is equal to 0, returns an infinite sequence of
    start. When start is equal to end, returns empty list.

    - source + source
  • ratio?

    @@ -3671,7 +3764,7 @@

    ratio?

    (ratio? n)

    Returns true if n is a Ratio

    - source + source
  • rational?

    @@ -3680,7 +3773,7 @@

    rational?

    (rational? n)

    Returns true if n is a rational number

    - source + source
  • re-find

    @@ -3689,7 +3782,7 @@

    re-find

    (re-find re s)

    Returns the leftmost regex match, if any, of string to pattern.

    - source + source
  • re-matches

    @@ -3698,7 +3791,7 @@

    re-matches

    (re-matches re s)

    Returns the match, if any, of string to pattern.

    - source + source
  • re-pattern

    @@ -3707,7 +3800,7 @@

    re-pattern

    (re-pattern s)

    Returns an instance of Regex

    - source + source
  • re-seq

    @@ -3716,7 +3809,7 @@

    re-seq

    (re-seq re s)

    Returns a sequence of successive matches of pattern in string

    - source + source
  • read

    @@ -3726,7 +3819,7 @@

    read

    (read reader)

    Reads the next object from reader (defaults to *in*)

    - source + source
  • read-line

    @@ -3735,7 +3828,7 @@

    read-line

    (read-line)

    Reads the next line from *in*. Returns nil if an error (such as EOF) is detected.

    - source + source
  • read-string

    @@ -3744,7 +3837,7 @@

    read-string

    (read-string s)

    Reads one object from the string s.

    - source + source
  • realized?

    @@ -3753,7 +3846,7 @@

    realized?

    (realized? x)

    Returns true if a value has been produced for a delay or lazy sequence.

    - source + source
  • reduce

    @@ -3772,7 +3865,7 @@

    reduce-kv

    (reduce-kv f init coll)

    Reduces an associative collection. f should be a function of 3
    arguments. Returns the result of applying f to init, the first key
    and the first value in coll, then applying f to that result and the
    2nd key and value, etc. If coll contains no entries, returns init
    and f is not called. Note that reduce-kv is supported on vectors,
    where the keys will be the ordinals.

    - source + source
  • reductions

    @@ -3782,7 +3875,7 @@

    reductions

    (reductions f init coll)

    Returns a lazy seq of the intermediate values of the reduction (as
    per reduce) of coll by f, starting with init.

    - source + source
  • refer

    @@ -3791,7 +3884,16 @@

    refer

    (refer ns-sym & filters)

    refers to all public vars of ns, subject to filters.
    filters can include at most one each of:

    :exclude list-of-symbols
    :only list-of-symbols
    :rename map-of-fromsymbol-tosymbol

    For each public interned var in the namespace named by the symbol,
    adds a mapping from the name of the var to the var to the current
    namespace. Throws an exception if name is already mapped to
    something else in the current namespace. Filters can be used to
    select a subset, via inclusion or exclusion, or to provide a mapping
    to a symbol different from the var's name, in order to prevent
    clashes. Use :use in the ns macro in preference to calling this directly.

    - source + source +
  • +
  • +

    refer-clojure

    + Macro + v1.0 +
    (refer-clojure & filters)
    +
    +

    Same as (refer 'joker.core )

    + source
  • rem

    @@ -3809,7 +3911,25 @@

    remove

    (remove pred coll)

    Returns a lazy sequence of the items in coll for which
    (pred item) returns false. pred must be free of side-effects.

    - source + source +
  • +
  • +

    remove-all-methods

    + Function + v1.0 +
    (remove-all-methods multifn)
    +
    +

    Removes all of the methods of multimethod.

    + source +
  • +
  • +

    remove-method

    + Function + v1.0 +
    (remove-method multifn dispatch-val)
    +
    +

    Removes the method of multimethod associated with dispatch-value.

    + source
  • remove-ns

    @@ -3818,7 +3938,7 @@

    remove-ns

    (remove-ns sym)

    Removes the namespace named by the symbol. Use with caution.
    Cannot be used to remove the clojure namespace.

    - source + source
  • repeat

    @@ -3828,7 +3948,7 @@

    repeat

    (repeat n x)

    Returns a lazy (infinite!, or length n if supplied) sequence of xs.

    - source + source
  • repeatedly

    @@ -3838,7 +3958,7 @@

    repeatedly

    (repeatedly n f)

    Takes a function of no args, presumably with side effects, and
    returns an infinite (or length n if supplied) lazy sequence of calls
    to it

    - source + source
  • replace

    @@ -3847,7 +3967,7 @@

    replace

    (replace smap coll)

    Given a map of replacement pairs and a vector/collection, returns a
    vector/seq with any elements = a key in smap replaced with the
    corresponding val in smap.

    - source + source
  • require

    @@ -3856,7 +3976,7 @@

    require

    (require & args)

    Loads libs, skipping any that are already loaded. Each argument is
    either a libspec that identifies a lib, a prefix list that identifies
    multiple libs whose names share a common prefix, or a flag that modifies
    how all the identified libs are loaded. Use :require in the ns macro
    in preference to calling this directly.

    Libs

    A 'lib' is a named set of resources in classpath whose contents define a
    library of Clojure code. Lib names are symbols and each lib is associated
    with a Clojure namespace and a Java package that share its name. A lib's
    name also locates its root directory within classpath using Java's
    package name to classpath-relative path mapping. All resources in a lib
    should be contained in the directory structure under its root directory.
    All definitions a lib makes should be in its associated namespace.

    'require loads a lib by loading its root resource. The root resource path
    is derived from the lib name in the following manner:
    Consider a lib named by the symbol 'x.y.z; it has the root directory
    /x/y/, and its root resource is /x/y/z.clj. The root
    resource should contain code to create the lib's namespace (usually by using
    the ns macro) and load any additional lib resources.

    Libspecs

    A libspec is a lib name or a vector containing a lib name followed by
    options expressed as sequential keywords and arguments.

    Recognized options:
    :as takes a symbol as its argument and makes that symbol an alias to the
    lib's namespace in the current namespace.
    :refer takes a list of symbols to refer from the namespace or the :all
    keyword to bring in all public vars.

    Prefix Lists

    It's common for Clojure code to depend on several libs whose names have
    the same prefix. When specifying libs, prefix lists can be used to reduce
    repetition. A prefix list contains the shared prefix followed by libspecs
    with the shared prefix removed from the lib names. After removing the
    prefix, the names that remain must not contain any periods.

    Flags

    A flag is a keyword.
    Recognized flags: :reload, :reload-all, :verbose
    :reload forces loading of all the identified libs even if they are
    already loaded
    :reload-all implies :reload and also forces loading of all libs that the
    identified libs directly or indirectly load via require or use
    :verbose triggers printing information about each load, alias, and refer

    Example:

    The following would load the libraries clojure.zip and clojure.set
    abbreviated as 's'.

    (require '(clojure zip [set :as s]))

    - source + source
  • requiring-resolve

    @@ -3865,7 +3985,7 @@

    requiring-resolve

    (requiring-resolve sym)

    Resolves namespace-qualified sym per 'resolve'. If initial resolve
    fails, attempts to require sym's namespace and retries.

    - source + source
  • reset!

    @@ -3874,7 +3994,7 @@

    reset!

    (reset! atom newval)

    Sets the value of atom to newval without regard for the
    current value. Returns newval.

    - source + source
  • reset-meta!

    @@ -3883,7 +4003,7 @@

    reset-meta!

    (reset-meta! ref metadata-map)

    Atomically resets the metadata for a namespace/var/atom

    - source + source
  • reset-vals!

    @@ -3892,7 +4012,7 @@

    reset-vals!

    (reset-vals! atom newval)

    Sets the value of atom to newval. Returns [old new], the value of the
    atom before and after the reset.

    - source + source
  • resolve

    @@ -3902,7 +4022,7 @@

    resolve

    (resolve env sym)

    Same as (ns-resolve *ns* sym) or (ns-resolve *ns* env sym)

    - source + source
  • rest

    @@ -3929,7 +4049,7 @@

    reversible?

    (reversible? coll)

    Returns true if coll implements Reversible

    - source + source
  • rseq

    @@ -3947,7 +4067,7 @@

    run!

    (run! proc coll)

    Runs the supplied procedure (via reduce), for purposes of side
    effects, on successive items in the collection. Returns nil.

    - source + source
  • second

    @@ -3992,7 +4112,7 @@

    seqable?

    (seqable? x)

    Return true if the seq function is supported for x

    - source + source
  • sequence

    @@ -4001,7 +4121,7 @@

    sequence

    (sequence coll)

    Coerces coll to a (possibly empty) sequence, if it is not already
    one. Will not force a lazy seq. (sequence nil) yields ()

    - source + source
  • sequential?

    @@ -4010,7 +4130,7 @@

    sequential?

    (sequential? coll)

    Returns true if coll implements Sequential

    - source + source
  • set

    @@ -4019,7 +4139,7 @@

    set

    (set coll)

    Returns a set of the distinct elements of coll.

    - source + source
  • set?

    @@ -4028,7 +4148,7 @@

    set?

    (set? x)

    Returns true if x implements Set

    - source + source
  • shuffle

    @@ -4037,7 +4157,7 @@

    shuffle

    (shuffle coll)

    Return a random permutation of coll

    - source + source
  • simple-ident?

    @@ -4073,7 +4193,7 @@

    slurp

    (slurp f)

    Opens file f and reads all its contents, returning a string.

    - source + source
  • some

    @@ -4082,7 +4202,7 @@

    some

    (some pred coll)

    Returns the first logical true value of (pred x) for any x in coll,
    else nil. One common idiom is to use a set as pred, for example
    this will return :fred if :fred is in the sequence, otherwise nil:
    (some #{:fred} coll)

    - source + source
  • some->

    @@ -4091,7 +4211,7 @@

    some->

    (some-> expr & forms)

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

    - source + source
  • some->>

    @@ -4100,7 +4220,7 @@

    some->>

    (some->> expr & forms)

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

    - source + source
  • some-fn

    @@ -4112,7 +4232,7 @@

    some-fn

    (some-fn p1 p2 p3 & ps)

    Takes a set of predicates and returns a function f that returns the first logical true value
    returned by one of its composing predicates against any of its arguments, else it returns
    logical false. Note that f is short-circuiting in that it will stop execution on the first
    argument that triggers a logical true result against the original predicates.

    - source + source
  • some?

    @@ -4131,7 +4251,7 @@

    sort

    (sort comp coll)

    Returns a sorted sequence of the items in coll. If no comparator is
    supplied, uses compare.

    - source + source
  • sort-by

    @@ -4141,7 +4261,7 @@

    sort-by

    (sort-by keyfn comp coll)

    Returns a sorted sequence of the items in coll, where the sort
    order is determined by comparing (keyfn item). If no comparator is
    supplied, uses compare.

    - source + source
  • special-symbol?

    @@ -4150,7 +4270,7 @@

    special-symbol?

    (special-symbol? s)

    Returns true if s names a special form

    - source + source
  • spit

    @@ -4159,7 +4279,7 @@

    spit

    (spit f content)

    Opposite of slurp. Opens file f, writes content, then
    closes f.

    - source + source
  • split-at

    @@ -4168,7 +4288,7 @@

    split-at

    (split-at n coll)

    Returns a vector of [(take n coll) (drop n coll)]

    - source + source
  • split-with

    @@ -4177,7 +4297,7 @@

    split-with

    (split-with pred coll)

    Returns a vector of [(take-while pred coll) (drop-while pred coll)]

    - source + source
  • str

    @@ -4205,7 +4325,7 @@

    subs

    (subs s start end)

    Returns the substring of s beginning at start inclusive, and ending
    at end (defaults to length of string), exclusive.

    - source + source
  • subvec

    @@ -4215,7 +4335,7 @@

    subvec

    (subvec v start end)

    Returns a persistent vector of the items in vector from
    start (inclusive) to end (exclusive). If end is not supplied,
    defaults to (count vector). This operation is O(1) and very fast, as
    the resulting vector shares structure with the original and no
    trimming is done.

    - source + source
  • swap!

    @@ -4224,7 +4344,7 @@

    swap!

    (swap! atom f & args)

    Atomically swaps the value of atom to be:
    (apply f current-value-of-atom args).
    Returns the value that was swapped in.

    - source + source
  • swap-vals!

    @@ -4233,7 +4353,7 @@

    swap-vals!

    (swap-vals! atom f & args)

    Atomically swaps the value of atom to be:
    (apply f current-value-of-atom args). Note that f may be called
    multiple times, and thus should be free of side effects.
    Returns [old new], the value of the atom before and after the swap.

    - source + source
  • symbol

    @@ -4261,7 +4381,7 @@

    take

    (take n coll)

    Returns a lazy sequence of the first n items in coll, or all items if
    there are fewer than n.

    - source + source
  • take-last

    @@ -4270,7 +4390,7 @@

    take-last

    (take-last n coll)

    Returns a seq of the last n items in coll. Depending on the type
    of coll may be no better than linear time. For vectors, see also subvec.

    - source + source
  • take-nth

    @@ -4279,7 +4399,7 @@

    take-nth

    (take-nth n coll)

    Returns a lazy seq of every nth item in coll.

    - source + source
  • take-while

    @@ -4288,7 +4408,7 @@

    take-while

    (take-while pred coll)

    Returns a lazy sequence of successive items from coll while
    (pred item) returns true. pred must be free of side-effects.

    - source + source
  • test

    @@ -4297,7 +4417,7 @@

    test

    (test v)

    test [v] finds fn at key :test in var metadata and calls it,
    presuming failure will throw exception

    - source + source
  • the-ns

    @@ -4306,7 +4426,7 @@

    the-ns

    (the-ns x)

    If passed a namespace, returns it. Else, when passed a symbol,
    returns the namespace named by it, throwing an exception if not
    found.

    - source + source
  • time

    @@ -4315,7 +4435,7 @@

    time

    (time expr)

    Evaluates expr and prints the time it took. Returns the value of expr.

    - source + source
  • trampoline

    @@ -4325,7 +4445,7 @@

    trampoline

    (trampoline f & args)

    trampoline can be used to convert algorithms requiring mutual
    recursion without stack consumption. Calls f with supplied args, if
    any. If f returns a fn, calls that fn with no arguments, and
    continues to repeat, until the return value is not a fn, then
    returns that non-fn value. Note that if you want to return a fn as a
    final value, you must wrap it in some data structure and unpack it
    after trampoline returns.

    - source + source
  • tree-seq

    @@ -4334,7 +4454,7 @@

    tree-seq

    (tree-seq branch? children root)

    Returns a lazy sequence of the nodes in a tree, via a depth-first walk.
    branch? must be a fn of one arg that returns true if passed a node
    that can have children (but may not). children must be a fn of one
    arg that returns a sequence of the children. Will only be called on
    nodes for which branch? returns true. Root is the root node of the
    tree.

    - source + source
  • true?

    @@ -4352,7 +4472,7 @@

    type

    (type x)

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

    - source + source
  • unsigned-bit-shift-right

    @@ -4374,7 +4494,7 @@

    update

    (update m k f x y z & more)

    'Updates' a value in an associative structure, where k is a
    key and f is a function that will take the old value
    and any supplied args and return the new value, and returns a new
    structure. If the key does not exist, nil is passed as the old value.

    - source + source
  • update-in

    @@ -4383,7 +4503,7 @@

    update-in

    (update-in m ks f & args)

    'Updates' a value in a nested associative structure, where ks is a
    sequence of keys and f is a function that will take the old value
    and any supplied args and return the new value, and returns a new
    nested structure. If any levels do not exist, hash-maps will be
    created.

    - source + source
  • use

    @@ -4392,7 +4512,7 @@

    use

    (use & args)

    Like 'require, but also refers to each lib's namespace using
    joker.core/refer. Use :use in the ns macro in preference to calling
    this directly.

    'use accepts additional options in libspecs: :exclude, :only, :rename.
    The arguments and semantics for :exclude, :only, and :rename are the same
    as those documented for joker.core/refer.

    - source + source
  • val

    @@ -4419,7 +4539,7 @@

    var-get

    (var-get x)

    Gets the value in the var object

    - source + source
  • var-set

    @@ -4428,7 +4548,7 @@

    var-set

    (var-set x val)

    Sets the value in the var object to val.

    - source + source
  • var?

    @@ -4437,7 +4557,7 @@

    var?

    (var? v)

    Returns true if v is of type Var

    - source + source
  • vary-meta

    @@ -4491,7 +4611,7 @@

    when-first

    (when-first bindings & body)

    bindings => x xs

    Roughly the same as (when (seq xs) (let [x (first xs)] body)) but xs is evaluated only once

    - source + source
  • when-let

    @@ -4527,7 +4647,7 @@

    while

    (while test & body)

    Repeatedly executes body while test expression is true. Presumes
    some side-effect will cause test to become false/nil. Returns nil

    - source + source
  • with-bindings

    @@ -4536,7 +4656,7 @@

    with-bindings

    (with-bindings binding-map & body)

    Takes a map of Var/value pairs. Sets the vars to the corresponding values.
    Then executes body. Resets the vars back to the original
    values after body was evaluated. Returns the value of body.

    - source + source
  • with-bindings*

    @@ -4545,7 +4665,7 @@

    with-bindings*

    (with-bindings* binding-map f & args)

    Takes a map of Var/value pairs. Sets the vars to the corresponding values.
    Then calls f with the supplied arguments. Resets the vars back to the original
    values after f returned. Returns whatever f returns.

    - source + source
  • with-in-str

    @@ -4554,7 +4674,7 @@

    with-in-str

    (with-in-str s & body)

    Evaluates body in a context in which *in* is bound to a fresh
    Buffer initialized with the string s.

    - source + source
  • with-meta

    @@ -4572,7 +4692,7 @@

    with-out-str

    (with-out-str & body)

    Evaluates exprs in a context in which *out* is bound to a fresh
    Buffer. Returns the string created by any nested printing
    calls.

    - source + source
  • with-redefs

    @@ -4581,7 +4701,7 @@

    with-redefs

    (with-redefs bindings & body)

    The same as binding

    - source + source
  • with-redefs-fn

    @@ -4590,7 +4710,7 @@

    with-redefs-fn

    (with-redefs-fn binding-map f & args)

    The same as with-bindings*

    - source + source
  • xml-seq

    @@ -4599,7 +4719,7 @@

    xml-seq

    (xml-seq root)

    A tree seq on the xml elements as per xml/parse

    - source + source
  • zero?

    @@ -4617,7 +4737,7 @@

    zipmap

    (zipmap keys vals)

    Returns a map with the keys mapped to the corresponding vals.

    - source + source
  • diff --git a/docs/joker.os.html b/docs/joker.os.html index 804c78621..6387a39b3 100644 --- a/docs/joker.os.html +++ b/docs/joker.os.html @@ -12,6 +12,9 @@

    Index

  • args
  • +
  • + chdir +
  • cwd
  • @@ -47,6 +50,15 @@

    args

    Returns a sequence of the command line arguments, starting with the program name (normally, joker).

    + +
  • +

    chdir

    + Function + v1.0 +
    (chdir dirname)
    +
    +

    Chdir changes the current working directory to the named directory. If there is an error, an exception will be thrown. Returns nil.

    +
  • cwd