Liking cljdoc? Tell your friends :D

thingy.core

Instantiate thingys and assign their invocation function.

Example:

  1. Create thingy instances.

    (def X (make-thingy :a :b))
    
    X ;; => [:a :b]
    
  2. Define an invocation function with defn.

    (defn foo-test
      "A 3-arity example, concatenating three vector-like objects."
      [a b c]
      (concat a b c))
    
  3. Assign the thingy invocation function.

    (assign-thingy-fn! foo-test)
    
  4. Test invocation behavior of the thingy.

    (X [:c :d] [:e :f]) ;; => (:a :b :c :d :e :f)
    
Instantiate thingys and assign their invocation function.

Example:

1. Create _thingy_ instances.
    ```clojure
    (def X (make-thingy :a :b))

    X ;; => [:a :b]
    ```

2. Define an invocation function with `defn`.
    ```clojure
    (defn foo-test
      "A 3-arity example, concatenating three vector-like objects."
      [a b c]
      (concat a b c))
    ```

3. Assign the _thingy_ invocation function.
    ```clojure
    (assign-thingy-fn! foo-test)
    ```

4. Test invocation behavior of the _thingy_.
    ```clojure
    (X [:c :d] [:e :f]) ;; => (:a :b :c :d :e :f)
    ```
raw docstring

assign-thingy-fn!clj

(assign-thingy-fn! f)

Synchronously mutates the invocation function of all thingy instances to function f.

f is a function with an arity of 0 to 9, inclusive. If f accepts an argument, the thingy instance is that first argument, followed by up to eight additonal arguments.

See also make-thingy and thingy.core.

Synchronously mutates the invocation function of all _thingy_ instances to
function `f`.

`f` is a function with an arity of 0 to 9, inclusive. If `f` accepts an
argument, the thingy instance is that first argument, followed by up to eight
additonal arguments.

See also [[make-thingy]] and [[thingy.core]].
raw docstring

make-thingyclj

(make-thingy & xs)

Given elements xs, returns an instance of a thingy. Analagous to clojure.core/vector.

See also [[defn-thingy]] and thingy.core.

Given elements `xs`, returns an instance of a _thingy_. Analagous to
[clojure.core/vector](https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/vector).

See also [[defn-thingy]] and [[thingy.core]].
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close