From 7d0e37ba65fd30c3e06c7daf5915957a5933b1f7 Mon Sep 17 00:00:00 2001 From: Roman Bataev Date: Sat, 12 Jan 2019 15:56:08 -0800 Subject: [PATCH] v0.11.1 --- core/procs.go | 2 +- docs/joker.core.html | 142 +++++++++++++++++++++---------------------- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/core/procs.go b/core/procs.go index d4deb8958..7cbe0eab0 100644 --- a/core/procs.go +++ b/core/procs.go @@ -48,7 +48,7 @@ const ( PRINT_IF_NOT_NIL ) -const VERSION = "v0.11.0" +const VERSION = "v0.11.1" var internalLibs map[string][]byte diff --git a/docs/joker.core.html b/docs/joker.core.html index 3764e5bd9..279b3292e 100644 --- a/docs/joker.core.html +++ b/docs/joker.core.html @@ -1194,7 +1194,7 @@

*1

v1.0

   

bound in a repl to the most recent value printed

- source + source
  • *2

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

    *2

    v1.0
    
       

    bound in a repl to the second most recent value printed

    - source + source
  • *3

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

    *3

    v1.0
    
       

    bound in a repl to the third most recent value printed

    - source + source
  • *assert*

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

    *e

    v1.0
    
       

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

    - source + source
  • *err*

    @@ -1533,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

    @@ -1562,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?

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

    associative?

    (associative? coll)

    Returns true if coll implements Associative

    - source + source
  • atom

    @@ -1755,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

    @@ -1773,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

    @@ -1782,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

    @@ -1836,7 +1836,7 @@

    coll?

    (coll? x)

    Returns true if x implements Collection

    - source + source
  • comment

    @@ -1906,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->>

    @@ -1915,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

    @@ -1924,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

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

    counted?

    (counted? coll)

    Returns true if coll implements count in constant time

    - source + source
  • create-ns

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

    dedupe

    (dedupe coll)

    Returns a lazy sequence removing consecutive duplicates in coll.

    - source + source
  • default-data-readers

    @@ -2041,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

    @@ -2060,7 +2060,7 @@

    defmethod

    (defmethod multifn dispatch-val & fn-tail)

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

    - source + source
  • defmulti

    @@ -2069,7 +2069,7 @@

    defmulti

    (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 + source
  • defn

    @@ -2286,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

    @@ -2316,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?

    @@ -2398,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

    @@ -2443,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?

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

    fn?

    (fn? x)

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

    - source + source
  • fnext

    @@ -2500,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

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

    frequencies

    (frequencies coll)

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

    - source + source
  • gensym

    @@ -2566,7 +2566,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
  • get-method

    @@ -2575,7 +2575,7 @@

    get-method

    (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 + source
  • group-by

    @@ -2584,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

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

    indexed?

    (indexed? coll)

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

    - source + source
  • instance?

    @@ -2780,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

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

    joker-version

    (joker-version)

    Returns joker version as a printable string.

    - source + source
  • juxt

    @@ -2819,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

    @@ -2828,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

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

    list?

    (list? x)

    Returns true if x is a List

    - source + source
  • load

    @@ -2940,8 +2940,8 @@

    load

    v1.0
    (load & libs)
    -

    Loads code from libs.

    - source +

    Loads code from libs, throwing error if cyclic dependency detected,
    and ignoring libs already being loaded.

    + source
  • load-file

    @@ -2949,8 +2949,8 @@

    load-file

    v1.0
    (load-file f)
    -

    Loads code from file f

    - source +

    Loads code from file f. Does not protect against recursion.

    + source
  • load-string

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

    loaded-libs

    (loaded-libs)

    Returns an UNSORTED set of symbols naming the currently loaded libs

    - source + source
  • loop

    @@ -3016,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?

    @@ -3046,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

    @@ -3077,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

    @@ -3113,7 +3113,7 @@

    methods

    (methods multifn)

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

    - source + source
  • min

    @@ -3481,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

    @@ -3490,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

    @@ -3571,7 +3571,7 @@

    prefer-method

    (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 + source
  • prefers

    @@ -3580,7 +3580,7 @@

    prefers

    (prefers multifn)

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

    - source + source
  • print

    @@ -3734,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

    @@ -3743,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

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

    realized?

    (realized? x)

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

    - source + source
  • reduce

    @@ -3875,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

    @@ -3920,7 +3920,7 @@

    remove-all-methods

    (remove-all-methods multifn)

    Removes all of the methods of multimethod.

    - source + source
  • remove-method

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

    remove-method

    (remove-method multifn dispatch-val)

    Removes the method of multimethod associated with dispatch-value.

    - source + source
  • remove-ns

    @@ -3975,7 +3975,7 @@

    require

    v1.0
    (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]))

    +

    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 Joker package that
    share its name. A lib's name also locates its root directory within
    *classpath* using its 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
    <*classpath*>/x/y/, and its root resource is
    <*classpath*>/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
  • @@ -3985,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!

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

    reversible?

    (reversible? coll)

    Returns true if coll implements Reversible

    - source + source
  • rseq

    @@ -4067,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

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

    seqable?

    (seqable? x)

    Return true if the seq function is supported for x

    - source + source
  • sequence

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

    sequential?

    (sequential? coll)

    Returns true if coll implements Sequential

    - source + source
  • set

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

    shuffle

    (shuffle coll)

    Return a random permutation of coll

    - source + source
  • simple-ident?

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

    slurp

    (slurp f)

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

    - source + source
  • some

    @@ -4211,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->>

    @@ -4220,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

    @@ -4232,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?

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

    spit

    (spit f content)

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

    - source + source
  • split-at

    @@ -4445,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

    @@ -4494,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

    @@ -4503,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

    @@ -4512,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

    @@ -4647,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