diff --git a/core/procs.go b/core/procs.go index c347cc9fb..8ca1c737c 100644 --- a/core/procs.go +++ b/core/procs.go @@ -41,7 +41,7 @@ const ( PRINT_IF_NOT_NIL ) -const VERSION = "v0.10.0" +const VERSION = "v0.10.1" const ( CLJ Dialect = iota diff --git a/docs/joker.core.html b/docs/joker.core.html index a5715f6f8..511cd6ec3 100644 --- a/docs/joker.core.html +++ b/docs/joker.core.html @@ -372,12 +372,18 @@

Index

  • every?
  • +
  • + ex-cause +
  • ex-data
  • ex-info
  • +
  • + ex-message +
  • false?
  • @@ -1155,7 +1161,7 @@

    *1

    v1.0
    
       

    bound in a repl to the most recent value printed

    - source + source
  • *2

    @@ -1163,7 +1169,7 @@

    *2

    v1.0
    
       

    bound in a repl to the second most recent value printed

    - source + source
  • *3

    @@ -1171,7 +1177,7 @@

    *3

    v1.0
    
       

    bound in a repl to the third most recent value printed

    - source + source
  • *assert*

    @@ -1195,7 +1201,7 @@

    *e

    v1.0
    
       

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

    - source + source
  • *err*

    @@ -1494,7 +1500,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

    @@ -1504,7 +1510,7 @@

    assert

    (assert x message)

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

    - source + source
  • assoc

    @@ -1523,7 +1529,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?

    @@ -1532,7 +1538,7 @@

    associative?

    (associative? coll)

    Returns true if coll implements Associative

    - source + source
  • atom

    @@ -1707,7 +1713,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

    @@ -1716,7 +1722,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

    @@ -1734,7 +1740,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

    @@ -1743,7 +1749,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

    @@ -1788,7 +1794,7 @@

    coll?

    (coll? x)

    Returns true if x implements Collection

    - source + source
  • comment

    @@ -1858,7 +1864,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->>

    @@ -1867,7 +1873,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

    @@ -1876,7 +1882,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

    @@ -1931,7 +1937,7 @@

    counted?

    (counted? coll)

    Returns true if coll implements count in constant time

    - source + source
  • create-ns

    @@ -1985,7 +1991,7 @@

    dedupe

    (dedupe coll)

    Returns a lazy sequence removing consecutive duplicates in coll.

    - source + source
  • default-data-readers

    @@ -1993,7 +1999,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

    @@ -2022,7 +2028,7 @@

    defn-

    (defn- name & decls)

    same as defn, yielding non-public def

    - source + source
  • defonce

    @@ -2031,7 +2037,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

    @@ -2098,7 +2104,7 @@

    distinct

    (distinct coll)

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

    - source + source
  • distinct?

    @@ -2109,7 +2115,7 @@

    distinct?

    (distinct? x y & more)

    Returns true if no two of the arguments are =

    - source + source
  • doall

    @@ -2211,7 +2217,7 @@

    empty

    (empty coll)

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

    - source + source
  • empty?

    @@ -2220,7 +2226,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

    @@ -2250,7 +2256,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?

    @@ -2261,6 +2267,15 @@

    every?

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

    source
  • +
  • +

    ex-cause

    + Function + v1.0 +
    (ex-cause ex)
    +
    +

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

    + source +
  • ex-data

    Function @@ -2280,6 +2295,15 @@

    ex-info

    Create an instance of ExInfo, an Error that carries a map of additional data.

    source
  • +
  • +

    ex-message

    + Function + v1.0 +
    (ex-message ex)
    +
    +

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

    + source +
  • false?

    Function @@ -2314,7 +2338,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 +2383,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?

    @@ -2396,7 +2420,7 @@

    fn?

    (fn? x)

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

    - source + source
  • fnext

    @@ -2416,7 +2440,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

    @@ -2443,7 +2467,7 @@

    format

    (format fmt & args)

    Formats a string using fmt.Sprintf

    - source + source
  • frequencies

    @@ -2452,7 +2476,7 @@

    frequencies

    (frequencies coll)

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

    - source + source
  • gensym

    @@ -2482,7 +2506,7 @@

    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
  • group-by

    @@ -2491,7 +2515,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

    @@ -2500,7 +2524,7 @@

    hash

    (hash x)

    Returns the hash code of its argument.

    - source + source
  • hash-map

    @@ -2584,7 +2608,7 @@

    in-ns

    (in-ns name)

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

    - source + source
  • inc

    @@ -2611,7 +2635,7 @@

    indexed?

    (indexed? coll)

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

    - source + source
  • instance?

    @@ -2678,7 +2702,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

    @@ -2687,7 +2711,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

    @@ -2705,7 +2729,7 @@

    joker-version

    (joker-version)

    Returns joker version as a printable string.

    - source + source
  • juxt

    @@ -2726,7 +2750,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

    @@ -2735,7 +2759,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

    @@ -2839,7 +2863,7 @@

    list?

    (list? x)

    Returns true if x is a List

    - source + source
  • load

    @@ -2848,7 +2872,7 @@

    load

    (load & libs)

    Loads code from libs.

    - source + source
  • load-file

    @@ -2857,7 +2881,7 @@

    load-file

    (load-file f)

    Loads code from file f

    - source + source
  • load-string

    @@ -2875,7 +2899,7 @@

    loaded-libs

    (loaded-libs)

    Returns an UNSORTED set of symbols naming the currently loaded libs

    - source + source
  • loop

    @@ -2923,7 +2947,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?

    @@ -2953,7 +2977,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

    @@ -2975,7 +2999,7 @@

    max-key

    (max-key k x y & more)

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

    - source + source
  • memoize

    @@ -2984,7 +3008,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

    @@ -3033,7 +3057,7 @@

    min-key

    (min-key k x y & more)

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

    - source + source
  • mod

    @@ -3159,7 +3183,7 @@

    not-empty

    (not-empty coll)

    If coll is empty, returns nil, else coll

    - source + source
  • not-every?

    @@ -3188,7 +3212,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

    @@ -3379,7 +3403,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

    @@ -3388,7 +3412,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

    @@ -3496,7 +3520,7 @@

    printf

    (printf fmt & args)

    Prints formatted output, as per format

    - source + source
  • println

    @@ -3596,7 +3620,7 @@

    rand

    (rand n)

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

    - source + source
  • rand-int

    @@ -3605,7 +3629,7 @@

    rand-int

    (rand-int n)

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

    - source + source
  • rand-nth

    @@ -3614,7 +3638,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

    @@ -3623,7 +3647,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 +3686,7 @@

    re-find

    (re-find re s)

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

    - source + source
  • re-matches

    @@ -3671,7 +3695,7 @@

    re-matches

    (re-matches re s)

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

    - source + source
  • re-pattern

    @@ -3680,7 +3704,7 @@

    re-pattern

    (re-pattern s)

    Returns an instance of Regex

    - source + source
  • re-seq

    @@ -3689,7 +3713,7 @@

    re-seq

    (re-seq re s)

    Returns a sequence of successive matches of pattern in string

    - source + source
  • read

    @@ -3726,7 +3750,7 @@

    realized?

    (realized? x)

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

    - source + source
  • reduce

    @@ -3755,7 +3779,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

    @@ -3811,7 +3835,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

    @@ -3820,7 +3844,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

    @@ -3829,7 +3853,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
  • reset!

    @@ -3893,7 +3917,7 @@

    reversible?

    (reversible? coll)

    Returns true if coll implements Reversible

    - source + source
  • rseq

    @@ -3911,7 +3935,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

    @@ -3956,7 +3980,7 @@

    seqable?

    (seqable? x)

    Return true if the seq function is supported for x

    - source + source
  • sequence

    @@ -3974,7 +3998,7 @@

    sequential?

    (sequential? coll)

    Returns true if coll implements Sequential

    - source + source
  • set

    @@ -4001,7 +4025,7 @@

    shuffle

    (shuffle coll)

    Return a random permutation of coll

    - source + source
  • simple-ident?

    @@ -4037,7 +4061,7 @@

    slurp

    (slurp f)

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

    - source + source
  • some

    @@ -4055,7 +4079,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->>

    @@ -4064,7 +4088,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

    @@ -4076,7 +4100,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?

    @@ -4114,7 +4138,7 @@

    special-symbol?

    (special-symbol? s)

    Returns true if s names a special form

    - source + source
  • spit

    @@ -4123,7 +4147,7 @@

    spit

    (spit f content)

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

    - source + source
  • split-at

    @@ -4169,7 +4193,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

    @@ -4261,7 +4285,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

    @@ -4289,7 +4313,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

    @@ -4298,7 +4322,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?

    @@ -4338,7 +4362,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

    @@ -4347,7 +4371,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

    @@ -4356,7 +4380,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

    @@ -4401,7 +4425,7 @@

    var?

    (var? v)

    Returns true if v is of type Var

    - source + source
  • vary-meta

    @@ -4491,7 +4515,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

    @@ -4563,7 +4587,7 @@

    xml-seq

    (xml-seq root)

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

    - source + source
  • zero?