{:group-id "missionary", :artifact-id "missionary", :version "b.39", :analysis {"clj" ({:name missionary.core, :publics ({:name !, :file "missionary/core.cljc", :line 192, :arglists ([]), :doc "\nThrows an instance of `missionary.Cancelled` if current evaluation context is interrupted, otherwise returns nil. The\nevaluation context defaults to the current thread if the host platform supports it, and can be redefined with `sp`,\n`ap`, or `cp`.", :type :macro} {:name ?, :file "missionary/core.cljc", :line 199, :arglists ([task]), :doc "\nParks current evaluation context by given task. Evaluation resumes when the task completes, result is returned or\nrethrown according to completion status. Interrupting the evaluation context cancels the parking task. The evaluation\ncontext defaults to the current thread if the host platform supports it, and can be redefined with `sp` or `ap`.", :type :macro} {:name ?!, :file "missionary/core.cljc", :line 266, :arglists ([f]), :deprecated true, :doc "Alias for `?<`\n", :type :macro} {:name ?<, :file "missionary/core.cljc", :line 239, :arglists ([flow]), :doc "\nForks current evaluation context by given flow. Evaluation resumes whenever the flow transfers, result is returned or\nrethrown according to transfer status. Each transfer creates a new processing branch and defines a new evaluation\ncontext inherited from its parent. Concurrent processing branches are not allowed, and the current processing branch is\ninterrupted when the forking flow becomes ready to transfer again. Interrupting the parent evaluation context cancels\nthe forking flow and interrupts all processing branches currently being run and those subsequently run. The evaluation\ncontext is undefined by default and can be defined with `ap` or `cp`.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n(import missionary.Cancelled)\n\n(defn debounce [delay flow]\n (m/ap (let [x (m/?< flow)]\n (try (m/? (m/sleep delay x))\n (catch Cancelled _ (m/amb))))))\n\n(m/? (->> (m/ap (let [n (m/amb 24 79 67 34 18 9 99 37)]\n (m/? (m/sleep n n))))\n (debounce 50)\n (m/reduce conj)))\n#_=> [24 79 9 37]\n```", :type :macro} {:name ?=, :file "missionary/core.cljc", :line 271, :arglists ([flow]), :deprecated true, :doc "Alias for `(?> ##Inf flow)`\n", :type :macro} {:name ?>, :file "missionary/core.cljc", :line 206, :arglists ([flow] [par flow]), :doc "\nForks current evaluation context by given flow. Evaluation resumes whenever the flow transfers, result is returned or\nrethrown according to transfer status. Each transfer creates a new processing branch and defines a new evaluation\ncontext inherited from its parent. `par` is an optional positive number, defaulting to 1, defining the maximal count\nof processing branches allowed to be run concurrently. Interrupting the parent evaluation context cancels the forking\nflow and interrupts all processing branches currently being run and those subsequently run. The evaluation context is\nundefined by default and can be defined with `ap`.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n(m/? (m/reduce conj (m/ap (inc (m/?> (m/seed [1 2 3]))))))\n#_=> [2 3 4]\n```\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n(m/? (->> (m/ap\n (let [x (m/?> 5 (m/seed [19 57 28 6 87]))]\n (m/? (m/sleep x x))))\n (m/reduce conj)))\n#_=> [6 19 28 57 87] ;; in 87 ms\n```", :type :macro} {:name ??, :file "missionary/core.cljc", :line 234, :arglists ([f]), :deprecated true, :doc "Alias for `?>`\n", :type :macro} {:name absolve, :file "missionary/core.cljc", :line 133, :arglists ([task]), :doc "\nReturns a task running given `task` completing with a zero-argument function and completing with the result of this function call.", :type :var} {:name aggregate, :file "missionary/core.cljc", :line 544, :deprecated true, :doc "Alias for `reduce`\n", :type :var} {:name amb, :file "missionary/core.cljc", :line 496, :arglists ([] [form] [form & forms]), :doc "In an `ap` block, evaluates each form sequentially and returns successive results.\n", :type :macro} {:name amb=, :file "missionary/core.cljc", :line 508, :arglists ([] [form] [form & forms]), :doc "In an `ap` block, evaluates each form concurrently and returns results in order of availability.\n", :type :macro} {:name amb>, :file "missionary/core.cljc", :line 520, :arglists ([& forms]), :deprecated true, :doc "Alias for `amb`\n", :type :macro} {:name ap, :file "missionary/core.cljc", :line 304, :arglists ([& body]), :doc "\nReturns a discrete flow evaluating `body` (in an implicit `do`) in a new evaluation context and producing values of each\nsubsequent fork. Body evaluation can be parked by a task with `?` and forked by a flow with `?>` and `?<`. Evaluation\nand transfers are eager, backpressured by downstream transfers. Cancelling an `ap` process interrupts its root\nevaluation context.", :type :macro} {:name attempt, :file "missionary/core.cljc", :line 124, :arglists ([task]), :doc "\nReturns a task always succeeding with result of given `task` wrapped in a zero-argument function returning result if successful or throwing exception if failed.", :type :var} {:name blk, :file "missionary/core.cljc", :line 11, :doc "A `java.util.concurrent.Executor` optimized for blocking evaluation.\n", :type :var} {:name buffer, :file "missionary/core.cljc", :line 675, :arglists ([c f]), :doc "\nReturns a discrete flow producing values emitted by given discrete `flow`, accumulating upstream overflow up to `capacity` items.", :type :var} {:name compel, :file "missionary/core.cljc", :line 320, :arglists ([task]), :doc "\nInhibits cancellation signal of given `task`.", :type :var} {:name cp, :file "missionary/core.cljc", :line 291, :arglists ([& body]), :doc "\nReturns a continuous flow evaluating `body` (in an implicit `do`) in a new evaluation context and producing values of\neach subsequent fork. Body evaluation can be forked by a continuous flow with `?<`. Evaluation and transfers are lazy,\ndriven by downstream sampling. Cancelling an `cp` process interrupts its root evaluation context.", :type :macro} {:name cpu, :file "missionary/core.cljc", :line 17, :doc "A `java.util.concurrent.Executor` optimized for non-blocking evaluation.\n", :type :var} {:name dfv, :file "missionary/core.cljc", :line 329, :arglists ([]), :doc "\nCreates an instance of dataflow variable (aka single-assignment).\n\nA dataflow variable is a function implementing `assign` on 1-arity and `deref` on 2-arity (as task). `assign` immediately binds the variable to given value if not already bound and returns bound value. `deref` is a task completing with the value bound to the variable as soon as it's available.\n\nCancelling a `deref` task makes it fail immediately.\n```", :type :var} {:name eduction, :file "missionary/core.cljc", :line 574, :arglists ([xf* flow]), :doc "\nReturns a discrete flow running given discrete `flow` and transforming values with the composition of given transducers `xf*`.\n\nCancelling propagates to upstream flow. Early termination by the transducing stage (via `reduced` or throwing) cancels upstream flow.\n\nExample :\n```clojure\n(? (->> (seed (range 10))\n (eduction (filter odd?) (mapcat range) (partition-all 4))\n (reduce conj)))\n#_=> [[0 0 1 2] [0 1 2 3] [4 0 1 2] [3 4 5 6] [0 1 2 3] [4 5 6 7] [8]]\n```", :type :var} {:name enumerate, :file "missionary/core.cljc", :line 491, :deprecated true, :doc "Alias for `seed`\n", :type :var} {:name group-by, :file "missionary/core.cljc", :line 769, :arglists ([kf f]), :doc "\nReturns a discrete flow running given discrete flow, calling given key function on each produced value, grouping values\naccording to keys returned by the function, and producing a key-group pair for each grouping found. A group is a flow\nconsuming values matching a key. Upstream values are dispatched in constant time to their group consumer.\n\nCancelling a group consumer makes it fail immediately. If a value is subsequently found for the same grouping, the\nkey-group pair is produced again, including in the special case where the consumer is cancelled while a transfer was\npending. Cancelling a group consumer has no effect when the main process is cancelled.\n\nIf upstream fails, or if the key function throws, then upstream is cancelled and flushed and the error is propagated\ndownstream.\n\nWhen the last upstream value is consumed, downstream terminates along with each active consumer and subsequent ones.\n\nConcurrent consumers on a single group are not allowed, attempting to do so will fail the latest consumer.\n\nExample :\n```clojure\n(def words [\"Air\" \"Bud\" \"Cup\" \"Awake\" \"Break\" \"Chunk\" \"Ant\" \"Big\" \"Check\"])\n(def groups\n (m/ap (let [[k >x] (m/?= (m/group-by (juxt first count) (m/seed words)))]\n [k (m/? (m/reduce conj >x))])))\n(m/? (m/reduce conj {} groups))\n#_=> {[\\C 3] [\"Cup\"],\n [\\B 5] [\"Break\"],\n [\\A 5] [\"Awake\"],\n [\\B 3] [\"Bud\" \"Big\"],\n [\\A 3] [\"Air\" \"Ant\"],\n [\\C 5] [\"Chunk\" \"Check\"]}\n```", :type :var} {:name holding, :file "missionary/core.cljc", :line 454, :arglists ([lock & body]), :doc "\n`acquire`s given `semaphore` and evaluates `body` (in an implicit `do`), ensuring `semaphore` is `release`d after evaluation.", :type :macro} {:name integrate, :file "missionary/core.cljc", :line 620, :deprecated true, :doc "Alias for `reductions`\n", :type :var} {:name join, :file "missionary/core.cljc", :line 76, :arglists ([c] [c & ts]), :doc "\nReturns a task running given `tasks` concurrently.\n\nIf every task succeeds, `join` completes with the result of applying `f` to these results.\n\nIf any task fails, others are cancelled then `join` fails with this error.\n\nCancelling propagates to children tasks.\n\nExample :\n```clojure\n(? (join vector (sleep 1000 1) (sleep 1000 2)))\n#_=> [1 2] ;; 1 second later\n```", :type :var} {:name latest, :file "missionary/core.cljc", :line 685, :arglists ([f & flows]), :doc "\nReturns a flow running an arbitrary number of flows concurrently. The process is ready to transfer when at least one\ninput is ready to transfer. On transfer, all ready inputs are transferred, the function is called with the latest\nvalue of each input and the result is returned. If an input emits consecutive values, all of them are transferred and\nonly the latest one is retained. Each input must be initially ready.\n\nInput failures and exceptions thrown by `f` cancel the process and propagate the error. The process terminates when all\ninputs are terminated. Cancelling the process cancels all inputs.\n\n```clojure\n(defn sleep-emit [delays]\n (reductions {} 0\n (ap (let [n (?> (seed delays))]\n (? (sleep n n))))))\n\n(defn delay-each [delay input]\n (ap (? (sleep delay (?> input)))))\n\n(? (->> (latest vector\n (sleep-emit [24 79 67 34])\n (sleep-emit [86 12 37 93]))\n (delay-each 50)\n (reduce conj)))\n\n#_=> [[0 0] [24 0] [24 86] [79 12] [79 37] [67 37] [34 93]]\n```", :type :var} {:name mbx, :file "missionary/core.cljc", :line 342, :arglists ([]), :doc "\nCreates an instance of mailbox.\n\nA mailbox is a function implementing `post` on 1-arity and `fetch` on 2-arity (as task). `post` immediately pushes given value to mailbox and returns nil. `fetch` is a task pulling a value from mailbox as soon as it's non-empty and completing with this value.\n\nCancelling a `fetch` task makes it fail immediately.\n\nExample : an actor is a mailbox associated with a process consuming messages.\n```clojure\n(defn crash [^Throwable e] ;; let it crash philosophy\n (.printStackTrace e)\n (System/exit -1))\n\n(defn actor\n ([init] (actor init crash))\n ([init fail]\n (let [self (mbx)]\n ((sp\n (loop [b init]\n (recur (b self (? self)))))\n nil fail)\n self)))\n\n(def counter\n (actor\n ((fn beh [n]\n (fn [self cust]\n (cust n)\n (beh (inc n)))) 0)))\n\n(counter prn) ;; prints 0\n(counter prn) ;; prints 1\n(counter prn) ;; prints 2\n```", :type :var} {:name memo, :file "missionary/core.cljc", :line 832, :arglists ([t]), :doc "\nReturns a new publisher memoizing the result of task `t`.\n\nAs long as the task process did not terminate spontaneously, running the publisher as a task registers a subscription.\nCancelling a subscription deregisters it. A new task process is spawned when the first subscription is registered and\ncancelled when the last subscription is deregistered. After the task process terminated spontaneously, every registered\nsubscription and any subsequent subscription terminates immediately with the process result.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n\n(def fib42\n (m/memo\n (m/via m/cpu\n (println \"Computing 42th fibonacci...\")\n ((fn fib [n]\n (case n\n 0 0\n 1 1\n (+ (fib (dec n))\n (fib (dec (dec n))))))\n 42))))\n\n(fib42 prn prn) ;; expensive computation starts here, result is eventually printed\n(fib42 prn prn) ;; expensive computation doesn't run again, previous result is reused\n```", :type :var} {:name never, :file "missionary/core.cljc", :line 463, :type :var} {:name none, :file "missionary/core.cljc", :line 470, :doc "\nThe empty flow. Doesn't produce any value and terminates immediately. Cancelling has no effect.\n\nExample :\n```clojure\n(? (reduce conj none))\n#_=> []\n```", :type :var} {:name observe, :file "missionary/core.cljc", :line 561, :arglists ([s]), :doc "\nReturns a discrete flow observing values produced by a subject. `subject` must be a function taking a callback and\nreturning a cleanup thunk. On initialization, the process calls the subject with a fresh callback. Passing a value to\nthe callback makes the process ready to transfer this value. While a transfer is pending, the callback blocks the\ncalling thread until the transfer is complete. If the host platform doesn't support blocking, the callback throws an\nerror instead. Cancelling the process makes it fail immediately with an instance of `missionary.Cancelled`. After the\nprocess is cancelled, the callback has no effect anymore. The cleanup thunk is called on termination.", :type :var} {:name publisher, :file "missionary/core.cljc", :line 625, :arglists ([f]), :doc "\nReturns a `org.reactivestreams.Publisher` running given discrete `flow` on each subscription.", :type :var} {:name race, :file "missionary/core.cljc", :line 102, :arglists ([] [& ts]), :doc "\nReturns a task running given `tasks` concurrently.\n\nIf any task succeeds, others are cancelled then `race` completes with this result.\n\nIf every task fails, `race` fails.\n\nCancelling propagates to children tasks.\n\nExample :\n```clojure\n(? (race (sleep 1000 1) (sleep 2000 2)))\n#_=> 1 ;; 1 second later\n```", :type :var} {:name rdv, :file "missionary/core.cljc", :line 382, :arglists ([]), :doc "\nCreates an instance of synchronous rendez-vous.\n\nA synchronous rendez-vous is a function implementing `give` on its 1-arity and `take` on its 2-arity (as task). `give` takes a value to be transferred and returns a task completing with nil as soon as a taker is available. `take` is a task completing with transferred value as soon as a giver is available.\n\nCancelling `give` and `take` tasks makes them fail immediately.\n\nExample : producer / consumer stream communication\n```clojure\n(defn reducer [rf i take]\n (sp\n (loop [r i]\n (let [x (? take)]\n (if (identical? x take)\n r (recur (rf r x)))))))\n\n(defn iterator [give xs]\n (sp\n (loop [xs (seq xs)]\n (if-some [[x & xs] xs]\n (do (? (give x))\n (recur xs))\n (? (give give))))))\n\n(def stream (rdv))\n\n(? (join {} (iterator stream (range 100)) (reducer + 0 stream))) ;; returns 4950\n```", :type :var} {:name reactor, :file "missionary/core.cljc", :line 812, :arglists ([& body]), :doc "Use lazy publishers instead - memo, stream, signal.\n", :type :macro} {:name reactor-call, :file "missionary/core.cljc", :line 805, :arglists ([boot]), :doc "Use lazy publishers instead - memo, stream, signal.\n", :type :var} {:name reduce, :file "missionary/core.cljc", :line 527, :arglists ([rf flow] [rf i flow]), :doc "\nReturns a task reducing values produced by given discrete `flow` with `rf`, starting with `init` (or, if not provided, the result of calling `rf` with no argument).\n\nCancelling propagates to upstream flow. Early termination by `rf` (via `reduced` or throwing) cancels upstream flow.\n\nExample :\n```clojure\n(? (reduce + (seed (range 10))))\n#_=> 45\n```", :type :var} {:name reductions, :file "missionary/core.cljc", :line 600, :arglists ([rf f] [rf i f]), :doc "\nReturns a discrete flow running given discrete `flow` and emitting given `init` value (or, if not provided, the result of calling `rf` with no argument) followed by successive reductions (by rf) of upstream values with previously emitted value.\n\nCancelling propagates to upstream flow. Early termination by `rf` (via `reduced` or throwing) cancels upstream flow.\n\nExample :\n```clojure\n(? (->> [1 2 3 4 5]\n (seed)\n (reductions +)\n (reduce conj)))\n#_=> [0 1 3 6 10 15]\n```", :type :var} {:name relieve, :file "missionary/core.cljc", :line 645, :arglists ([flow] [sg flow]), :doc "\nReturns a flow consuming input `flow` as fast as possible and producing aggregates of successive values according to\ndownstream transfer rate. The set of transferred values must form a semigroup with given function `sg` as the internal\nbinary operation, i.e. `sg` must be associative. If `sg` is not provided, `{}` is used by default, i.e. all values but\nthe latest are discarded.\n\nCancelling propagates to upstream. If `sg` throws, upstream `flow` is cancelled.\n\nExample :\n```clojure\n;; Delays each `input` value by `delay` milliseconds\n(defn delay-each [delay input]\n (ap (? (sleep delay (?> input)))))\n\n(? (->> (ap (let [n (?> (seed [24 79 67 34 18 9 99 37]))]\n (? (sleep n n))))\n (relieve +)\n (delay-each 80)\n (reduce conj)))\n#_=> [24 79 67 61 99 37]\n```", :type :var} {:name sample, :file "missionary/core.cljc", :line 717, :arglists ([f sampled* sampler]), :doc "\nReturns a flow running an arbitrary number of sampled flows concurrently with a sampler flow. The process is ready to\ntransfer when the sampler is ready to transfer. On transfer, all ready inputs are transferred, the function is called\nwith the latest value of each input and the result is returned. If a sampled input emits consecutive values, all of\nthem are transferred and only the latest one is retained. Each sampled input must be initially ready.\n\nWhen the sampler input terminates, all sampled inputs are cancelled. Input failures and exceptions thrown by `f` cancel\nthe process, and propagate the error. The process terminates when all input flows are terminated. Cancelling the process\ncancels the sampler input.\n\nExample :\n```clojure\n(defn sleep-emit [delays]\n (ap (let [n (?> (seed delays))]\n (? (sleep n n)))))\n\n(defn delay-each [delay input]\n (ap (? (sleep delay (?> input)))))\n\n(m/? (->> (m/sample vector\n (m/reductions {} 0 (sleep-emit [24 79 67 34]))\n (sleep-emit [86 12 37 93]))\n (delay-each 50)\n (m/reduce conj)))\n\n#_=> [[24 86] [24 12] [79 37] [67 93]]\n```", :type :var} {:name seed, :file "missionary/core.cljc", :line 483, :arglists ([coll]), :doc "\nReturns a discrete flow producing values from given `collection`. Cancelling before having reached the end makes the flow fail immediately.", :type :var} {:name sem, :file "missionary/core.cljc", :line 416, :arglists ([] [n]), :doc "\nCreates a semaphore initialized with n tokens (1 if not provided, aka mutex).\n\nA semaphore is a function implementing `release` on 0-arity and `acquire` on 2-arity (as task). `release` immediately makes a token available and returns nil. `acquire` is a task completing with nil as soon as a token is available.\n\nCancelling an `acquire` task makes it fail immediately.\n\nExample : dining philosophers\n```clojure\n(defn phil [name f1 f2]\n (m/sp\n (while true\n (prn name :thinking)\n (m/? (m/sleep 500))\n (m/holding f1\n (m/holding f2\n (prn name :eating)\n (m/? (m/sleep 600)))))))\n\n(def forks (vec (repeatedly 5 m/sem)))\n\n(m/? (m/timeout\n (m/join vector\n (phil \"descartes\" (forks 0) (forks 1))\n (phil \"hume\" (forks 1) (forks 2))\n (phil \"plato\" (forks 2) (forks 3))\n (phil \"nietzsche\" (forks 3) (forks 4))\n (phil \"kant\" (forks 0) (forks 4)))\n 10000))\n```", :type :var} {:name signal, :file "missionary/core.cljc", :line 985, :arglists ([flow] [sg flow]), :doc "\nReturns a new publisher exposing successive values of `flow` regardless of subscribers' sampling rate. The set of\ntransferred values must form a semigroup with given function `sg` as the internal binary operation, i.e. `sg` must be\nassociative. If `sg` is not provided, `{}` is used by default, i.e. all values but the latest are discarded.\n\nAs long as the flow process did not terminate spontaneously, running the publisher as a flow registers a subscription.\nCancelling a subscription deregisters it. A new flow process is spawned when the first subscription is registered and\ncancelled when the last subscription is deregistered. After the flow process has terminated spontaneously, every\nregistered subscription and any subsequent subscription terminates immediately after consuming the latest item.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n\n(def !input (atom 1))\n(def main ; this is a reactive computation, the println reacts to input changes\n (let [ 42 ;; 1 second later\n```", :type :var} {:name sp, :file "missionary/core.cljc", :line 278, :arglists ([& body]), :doc "\nReturns a task evaluating `body` (in an implicit `do`) in a new evaluation context and completing its result. Body\nevaluation can be parked by a task with `?`. Cancelling a `sp` process interrupts its evaluation context.", :type :macro} {:name stream, :file "missionary/core.cljc", :line 879, :arglists ([f]), :doc "\nReturns a new publisher distributing successive items emitted by flow `f` while collecting subscribers' backpressure.\n\nAs long as the flow process did not terminate spontaneously, running the publisher as a flow registers a subscription.\nCancelling a subscription deregisters it. A new flow process is spawned when the first subscription is registered and\ncancelled when the last subscription is deregistered. After the flow process has terminated spontaneously, every\nregistered subscription and any subsequent subscription terminates immediately after consuming the current item, if any.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n\n(def >clock ;; A shared process emitting `nil` every second.\n (m/stream\n (m/ap\n (loop [i 0]\n (m/amb\n (m/? (m/sleep 1000))\n (recur (inc i)))))))\n\n(defn counter [r _] (inc r)) ;; A reducing function counting the number of items.\n\n((m/join vector\n (m/reduce counter 0 (m/eduction (take 3) >clock))\n (m/reduce counter 0 (m/eduction (take 4) >clock)))\n prn prn) ;; After 4 seconds, prints [3 4]\n```", :type :var} {:name stream!, :file "missionary/core.cljc", :line 818, :arglists ([flow]), :doc "Use stream instead.\n", :type :var} {:name subscribe, :file "missionary/core.cljc", :line 635, :arglists ([pub]), :doc "\nReturns a discrete flow subscribing to given `org.reactivestreams.Publisher`.", :type :var} {:name timeout, :file "missionary/core.cljc", :line 148, :arglists ([task delay] [task delay value]), :doc "\nReturns a task running given `task` and completing with its result if available within specified `delay` (in\nmilliseconds). Otherwise, input is cancelled and the process succeeds with `value`, or `nil` if not provided.\n\n```clojure\n(m/? (m/timeout (m/sleep 20 :a) 25 :b)) ;; :a after 20ms\n(m/? (m/timeout (m/sleep 20 :a) 15 :b)) ;; :b after 15ms\n(m/? (m/timeout (m/sleep 20 :a) 15)) ;; nil after 15ms\n```", :type :var} {:name transform, :file "missionary/core.cljc", :line 595, :deprecated true, :doc "Alias for `eduction`\n", :type :var} {:name via, :file "missionary/core.cljc", :line 41, :arglists ([exec & body]), :doc "\nReturns a task evaluating body (in an implicit `do`) on given `java.util.concurrent.Executor` and completing with its result.\n\nCancellation interrupts the evaluating thread.\n\nNot supported on clojurescript.\n\nExample :\n```clojure\n\n```", :type :macro} {:name via-call, :file "missionary/core.cljc", :line 23, :arglists ([e t]), :doc "\nSame as `via`, except the expression to evaluate is provided as a zero-arity function on second argument.\n\nNot supported on clojurescript.\n\n```clojure\n(? (via-call blk read-line))\n;; reads a line from stdin and returns it\n```", :type :var} {:name watch, :file "missionary/core.cljc", :line 549, :arglists ([r]), :doc "\nReturns a continuous flow reflecting the current state of a reference type. `reference` must support `add-watch`,\n`remove-watch` and `deref`. On initialization, the process is ready to transfer. On transfer, the current state is\nreturned. Whenever the state of the reference changes and a transfer is not pending, the process becomes ready to\ntransfer again. Cancelling the process makes it fail immediately with an instance of `missionary.Cancelled` and\nterminates the process.", :type :var} {:name zip, :file "missionary/core.cljc", :line 750, :arglists ([c f & fs]), :doc "\nReturns a discrete flow running given discrete `flows` concurrently and emitting the result of applying `f` to the set of first values emitted by each upstream flow, followed by the result of applying `f` to the set of second values and so on, until any upstream flow terminates, at which point the flow will cancel all other upstream flows and wait for their termination.\n\nCancelling propagates to every upstream flow. If any upstream flow fails or if `f` throws, the flow is cancelled.\n\nExample :\n```clojure\n(m/? (->> (m/zip vector\n (m/seed [1 2 3])\n (m/seed [:a :b :c]))\n (m/reduce conj)))\n#_=> [[1 :a] [2 :b] [3 :c]]\n```", :type :var})}), "cljs" ({:name missionary.core, :publics ({:name !, :file "missionary/core.cljc", :line 192, :arglists ([]), :doc "\nThrows an instance of `missionary.Cancelled` if current evaluation context is interrupted, otherwise returns nil. The\nevaluation context defaults to the current thread if the host platform supports it, and can be redefined with `sp`,\n`ap`, or `cp`.", :type :macro} {:name ?, :file "missionary/core.cljc", :line 199, :arglists ([task]), :doc "\nParks current evaluation context by given task. Evaluation resumes when the task completes, result is returned or\nrethrown according to completion status. Interrupting the evaluation context cancels the parking task. The evaluation\ncontext defaults to the current thread if the host platform supports it, and can be redefined with `sp` or `ap`.", :type :macro} {:name ?!, :file "missionary/core.cljc", :line 266, :arglists ([f]), :deprecated true, :doc "Alias for `?<`\n", :type :macro} {:name ?<, :file "missionary/core.cljc", :line 239, :arglists ([flow]), :doc "\nForks current evaluation context by given flow. Evaluation resumes whenever the flow transfers, result is returned or\nrethrown according to transfer status. Each transfer creates a new processing branch and defines a new evaluation\ncontext inherited from its parent. Concurrent processing branches are not allowed, and the current processing branch is\ninterrupted when the forking flow becomes ready to transfer again. Interrupting the parent evaluation context cancels\nthe forking flow and interrupts all processing branches currently being run and those subsequently run. The evaluation\ncontext is undefined by default and can be defined with `ap` or `cp`.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n(import missionary.Cancelled)\n\n(defn debounce [delay flow]\n (m/ap (let [x (m/?< flow)]\n (try (m/? (m/sleep delay x))\n (catch Cancelled _ (m/amb))))))\n\n(m/? (->> (m/ap (let [n (m/amb 24 79 67 34 18 9 99 37)]\n (m/? (m/sleep n n))))\n (debounce 50)\n (m/reduce conj)))\n#_=> [24 79 9 37]\n```", :type :macro} {:name ?=, :file "missionary/core.cljc", :line 271, :arglists ([flow]), :deprecated true, :doc "Alias for `(?> ##Inf flow)`\n", :type :macro} {:name ?>, :file "missionary/core.cljc", :line 206, :arglists ([flow] [par flow]), :doc "\nForks current evaluation context by given flow. Evaluation resumes whenever the flow transfers, result is returned or\nrethrown according to transfer status. Each transfer creates a new processing branch and defines a new evaluation\ncontext inherited from its parent. `par` is an optional positive number, defaulting to 1, defining the maximal count\nof processing branches allowed to be run concurrently. Interrupting the parent evaluation context cancels the forking\nflow and interrupts all processing branches currently being run and those subsequently run. The evaluation context is\nundefined by default and can be defined with `ap`.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n(m/? (m/reduce conj (m/ap (inc (m/?> (m/seed [1 2 3]))))))\n#_=> [2 3 4]\n```\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n(m/? (->> (m/ap\n (let [x (m/?> 5 (m/seed [19 57 28 6 87]))]\n (m/? (m/sleep x x))))\n (m/reduce conj)))\n#_=> [6 19 28 57 87] ;; in 87 ms\n```", :type :macro} {:name ??, :file "missionary/core.cljc", :line 234, :arglists ([f]), :deprecated true, :doc "Alias for `?>`\n", :type :macro} {:name absolve, :file "missionary/core.cljc", :line 133, :arglists ([task]), :doc "\nReturns a task running given `task` completing with a zero-argument function and completing with the result of this function call.", :type :var} {:name aggregate, :file "missionary/core.cljc", :line 544, :deprecated true, :doc "Alias for `reduce`\n", :type :var} {:name amb, :file "missionary/core.cljc", :line 496, :arglists ([] [form] [form & forms]), :doc "In an `ap` block, evaluates each form sequentially and returns successive results.\n", :type :macro} {:name amb=, :file "missionary/core.cljc", :line 508, :arglists ([] [form] [form & forms]), :doc "In an `ap` block, evaluates each form concurrently and returns results in order of availability.\n", :type :macro} {:name amb>, :file "missionary/core.cljc", :line 520, :arglists ([& forms]), :deprecated true, :doc "Alias for `amb`\n", :type :macro} {:name ap, :file "missionary/core.cljc", :line 304, :arglists ([& body]), :doc "\nReturns a discrete flow evaluating `body` (in an implicit `do`) in a new evaluation context and producing values of each\nsubsequent fork. Body evaluation can be parked by a task with `?` and forked by a flow with `?>` and `?<`. Evaluation\nand transfers are eager, backpressured by downstream transfers. Cancelling an `ap` process interrupts its root\nevaluation context.", :type :macro} {:name attempt, :file "missionary/core.cljc", :line 124, :arglists ([task]), :doc "\nReturns a task always succeeding with result of given `task` wrapped in a zero-argument function returning result if successful or throwing exception if failed.", :type :var} {:name blk, :file "missionary/core.cljc", :line 11, :doc "A `java.util.concurrent.Executor` optimized for blocking evaluation.\n", :type :var} {:name buffer, :file "missionary/core.cljc", :line 675, :arglists ([c f]), :doc "\nReturns a discrete flow producing values emitted by given discrete `flow`, accumulating upstream overflow up to `capacity` items.", :type :var} {:name compel, :file "missionary/core.cljc", :line 320, :arglists ([task]), :doc "\nInhibits cancellation signal of given `task`.", :type :var} {:name cp, :file "missionary/core.cljc", :line 291, :arglists ([& body]), :doc "\nReturns a continuous flow evaluating `body` (in an implicit `do`) in a new evaluation context and producing values of\neach subsequent fork. Body evaluation can be forked by a continuous flow with `?<`. Evaluation and transfers are lazy,\ndriven by downstream sampling. Cancelling an `cp` process interrupts its root evaluation context.", :type :macro} {:name cpu, :file "missionary/core.cljc", :line 17, :doc "A `java.util.concurrent.Executor` optimized for non-blocking evaluation.\n", :type :var} {:name dfv, :file "missionary/core.cljc", :line 329, :arglists ([]), :doc "\nCreates an instance of dataflow variable (aka single-assignment).\n\nA dataflow variable is a function implementing `assign` on 1-arity and `deref` on 2-arity (as task). `assign` immediately binds the variable to given value if not already bound and returns bound value. `deref` is a task completing with the value bound to the variable as soon as it's available.\n\nCancelling a `deref` task makes it fail immediately.\n```", :type :var} {:name eduction, :file "missionary/core.cljc", :line 574, :arglists ([xf* flow]), :doc "\nReturns a discrete flow running given discrete `flow` and transforming values with the composition of given transducers `xf*`.\n\nCancelling propagates to upstream flow. Early termination by the transducing stage (via `reduced` or throwing) cancels upstream flow.\n\nExample :\n```clojure\n(? (->> (seed (range 10))\n (eduction (filter odd?) (mapcat range) (partition-all 4))\n (reduce conj)))\n#_=> [[0 0 1 2] [0 1 2 3] [4 0 1 2] [3 4 5 6] [0 1 2 3] [4 5 6 7] [8]]\n```", :type :var} {:name enumerate, :file "missionary/core.cljc", :line 491, :deprecated true, :doc "Alias for `seed`\n", :type :var} {:name group-by, :file "missionary/core.cljc", :line 769, :arglists ([kf f]), :doc "\nReturns a discrete flow running given discrete flow, calling given key function on each produced value, grouping values\naccording to keys returned by the function, and producing a key-group pair for each grouping found. A group is a flow\nconsuming values matching a key. Upstream values are dispatched in constant time to their group consumer.\n\nCancelling a group consumer makes it fail immediately. If a value is subsequently found for the same grouping, the\nkey-group pair is produced again, including in the special case where the consumer is cancelled while a transfer was\npending. Cancelling a group consumer has no effect when the main process is cancelled.\n\nIf upstream fails, or if the key function throws, then upstream is cancelled and flushed and the error is propagated\ndownstream.\n\nWhen the last upstream value is consumed, downstream terminates along with each active consumer and subsequent ones.\n\nConcurrent consumers on a single group are not allowed, attempting to do so will fail the latest consumer.\n\nExample :\n```clojure\n(def words [\"Air\" \"Bud\" \"Cup\" \"Awake\" \"Break\" \"Chunk\" \"Ant\" \"Big\" \"Check\"])\n(def groups\n (m/ap (let [[k >x] (m/?= (m/group-by (juxt first count) (m/seed words)))]\n [k (m/? (m/reduce conj >x))])))\n(m/? (m/reduce conj {} groups))\n#_=> {[\\C 3] [\"Cup\"],\n [\\B 5] [\"Break\"],\n [\\A 5] [\"Awake\"],\n [\\B 3] [\"Bud\" \"Big\"],\n [\\A 3] [\"Air\" \"Ant\"],\n [\\C 5] [\"Chunk\" \"Check\"]}\n```", :type :var} {:name holding, :file "missionary/core.cljc", :line 454, :arglists ([lock & body]), :doc "\n`acquire`s given `semaphore` and evaluates `body` (in an implicit `do`), ensuring `semaphore` is `release`d after evaluation.", :type :macro} {:name integrate, :file "missionary/core.cljc", :line 620, :deprecated true, :doc "Alias for `reductions`\n", :type :var} {:name join, :file "missionary/core.cljc", :line 76, :arglists ([c] [c & ts]), :doc "\nReturns a task running given `tasks` concurrently.\n\nIf every task succeeds, `join` completes with the result of applying `f` to these results.\n\nIf any task fails, others are cancelled then `join` fails with this error.\n\nCancelling propagates to children tasks.\n\nExample :\n```clojure\n(? (join vector (sleep 1000 1) (sleep 1000 2)))\n#_=> [1 2] ;; 1 second later\n```", :type :var} {:name latest, :file "missionary/core.cljc", :line 685, :arglists ([f & flows]), :doc "\nReturns a flow running an arbitrary number of flows concurrently. The process is ready to transfer when at least one\ninput is ready to transfer. On transfer, all ready inputs are transferred, the function is called with the latest\nvalue of each input and the result is returned. If an input emits consecutive values, all of them are transferred and\nonly the latest one is retained. Each input must be initially ready.\n\nInput failures and exceptions thrown by `f` cancel the process and propagate the error. The process terminates when all\ninputs are terminated. Cancelling the process cancels all inputs.\n\n```clojure\n(defn sleep-emit [delays]\n (reductions {} 0\n (ap (let [n (?> (seed delays))]\n (? (sleep n n))))))\n\n(defn delay-each [delay input]\n (ap (? (sleep delay (?> input)))))\n\n(? (->> (latest vector\n (sleep-emit [24 79 67 34])\n (sleep-emit [86 12 37 93]))\n (delay-each 50)\n (reduce conj)))\n\n#_=> [[0 0] [24 0] [24 86] [79 12] [79 37] [67 37] [34 93]]\n```", :type :var} {:name mbx, :file "missionary/core.cljc", :line 342, :arglists ([]), :doc "\nCreates an instance of mailbox.\n\nA mailbox is a function implementing `post` on 1-arity and `fetch` on 2-arity (as task). `post` immediately pushes given value to mailbox and returns nil. `fetch` is a task pulling a value from mailbox as soon as it's non-empty and completing with this value.\n\nCancelling a `fetch` task makes it fail immediately.\n\nExample : an actor is a mailbox associated with a process consuming messages.\n```clojure\n(defn crash [^Throwable e] ;; let it crash philosophy\n (.printStackTrace e)\n (System/exit -1))\n\n(defn actor\n ([init] (actor init crash))\n ([init fail]\n (let [self (mbx)]\n ((sp\n (loop [b init]\n (recur (b self (? self)))))\n nil fail)\n self)))\n\n(def counter\n (actor\n ((fn beh [n]\n (fn [self cust]\n (cust n)\n (beh (inc n)))) 0)))\n\n(counter prn) ;; prints 0\n(counter prn) ;; prints 1\n(counter prn) ;; prints 2\n```", :type :var} {:name memo, :file "missionary/core.cljc", :line 832, :arglists ([t]), :doc "\nReturns a new publisher memoizing the result of task `t`.\n\nAs long as the task process did not terminate spontaneously, running the publisher as a task registers a subscription.\nCancelling a subscription deregisters it. A new task process is spawned when the first subscription is registered and\ncancelled when the last subscription is deregistered. After the task process terminated spontaneously, every registered\nsubscription and any subsequent subscription terminates immediately with the process result.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n\n(def fib42\n (m/memo\n (m/via m/cpu\n (println \"Computing 42th fibonacci...\")\n ((fn fib [n]\n (case n\n 0 0\n 1 1\n (+ (fib (dec n))\n (fib (dec (dec n))))))\n 42))))\n\n(fib42 prn prn) ;; expensive computation starts here, result is eventually printed\n(fib42 prn prn) ;; expensive computation doesn't run again, previous result is reused\n```", :type :var} {:name never, :file "missionary/core.cljc", :line 463, :type :var} {:name none, :file "missionary/core.cljc", :line 470, :doc "\nThe empty flow. Doesn't produce any value and terminates immediately. Cancelling has no effect.\n\nExample :\n```clojure\n(? (reduce conj none))\n#_=> []\n```", :type :var} {:name observe, :file "missionary/core.cljc", :line 561, :arglists ([s]), :doc "\nReturns a discrete flow observing values produced by a subject. `subject` must be a function taking a callback and\nreturning a cleanup thunk. On initialization, the process calls the subject with a fresh callback. Passing a value to\nthe callback makes the process ready to transfer this value. While a transfer is pending, the callback blocks the\ncalling thread until the transfer is complete. If the host platform doesn't support blocking, the callback throws an\nerror instead. Cancelling the process makes it fail immediately with an instance of `missionary.Cancelled`. After the\nprocess is cancelled, the callback has no effect anymore. The cleanup thunk is called on termination.", :type :var} {:name publisher, :file "missionary/core.cljc", :line 625, :arglists ([f]), :doc "\nReturns a `org.reactivestreams.Publisher` running given discrete `flow` on each subscription.", :type :var} {:name race, :file "missionary/core.cljc", :line 102, :arglists ([] [& ts]), :doc "\nReturns a task running given `tasks` concurrently.\n\nIf any task succeeds, others are cancelled then `race` completes with this result.\n\nIf every task fails, `race` fails.\n\nCancelling propagates to children tasks.\n\nExample :\n```clojure\n(? (race (sleep 1000 1) (sleep 2000 2)))\n#_=> 1 ;; 1 second later\n```", :type :var} {:name rdv, :file "missionary/core.cljc", :line 382, :arglists ([]), :doc "\nCreates an instance of synchronous rendez-vous.\n\nA synchronous rendez-vous is a function implementing `give` on its 1-arity and `take` on its 2-arity (as task). `give` takes a value to be transferred and returns a task completing with nil as soon as a taker is available. `take` is a task completing with transferred value as soon as a giver is available.\n\nCancelling `give` and `take` tasks makes them fail immediately.\n\nExample : producer / consumer stream communication\n```clojure\n(defn reducer [rf i take]\n (sp\n (loop [r i]\n (let [x (? take)]\n (if (identical? x take)\n r (recur (rf r x)))))))\n\n(defn iterator [give xs]\n (sp\n (loop [xs (seq xs)]\n (if-some [[x & xs] xs]\n (do (? (give x))\n (recur xs))\n (? (give give))))))\n\n(def stream (rdv))\n\n(? (join {} (iterator stream (range 100)) (reducer + 0 stream))) ;; returns 4950\n```", :type :var} {:name reactor, :file "missionary/core.cljc", :line 812, :arglists ([& body]), :doc "Use lazy publishers instead - memo, stream, signal.\n", :type :macro} {:name reactor-call, :file "missionary/core.cljc", :line 805, :arglists ([boot]), :doc "Use lazy publishers instead - memo, stream, signal.\n", :type :var} {:name reduce, :file "missionary/core.cljc", :line 527, :arglists ([rf flow] [rf i flow]), :doc "\nReturns a task reducing values produced by given discrete `flow` with `rf`, starting with `init` (or, if not provided, the result of calling `rf` with no argument).\n\nCancelling propagates to upstream flow. Early termination by `rf` (via `reduced` or throwing) cancels upstream flow.\n\nExample :\n```clojure\n(? (reduce + (seed (range 10))))\n#_=> 45\n```", :type :var} {:name reductions, :file "missionary/core.cljc", :line 600, :arglists ([rf f] [rf i f]), :doc "\nReturns a discrete flow running given discrete `flow` and emitting given `init` value (or, if not provided, the result of calling `rf` with no argument) followed by successive reductions (by rf) of upstream values with previously emitted value.\n\nCancelling propagates to upstream flow. Early termination by `rf` (via `reduced` or throwing) cancels upstream flow.\n\nExample :\n```clojure\n(? (->> [1 2 3 4 5]\n (seed)\n (reductions +)\n (reduce conj)))\n#_=> [0 1 3 6 10 15]\n```", :type :var} {:name relieve, :file "missionary/core.cljc", :line 645, :arglists ([flow] [sg flow]), :doc "\nReturns a flow consuming input `flow` as fast as possible and producing aggregates of successive values according to\ndownstream transfer rate. The set of transferred values must form a semigroup with given function `sg` as the internal\nbinary operation, i.e. `sg` must be associative. If `sg` is not provided, `{}` is used by default, i.e. all values but\nthe latest are discarded.\n\nCancelling propagates to upstream. If `sg` throws, upstream `flow` is cancelled.\n\nExample :\n```clojure\n;; Delays each `input` value by `delay` milliseconds\n(defn delay-each [delay input]\n (ap (? (sleep delay (?> input)))))\n\n(? (->> (ap (let [n (?> (seed [24 79 67 34 18 9 99 37]))]\n (? (sleep n n))))\n (relieve +)\n (delay-each 80)\n (reduce conj)))\n#_=> [24 79 67 61 99 37]\n```", :type :var} {:name sample, :file "missionary/core.cljc", :line 717, :arglists ([f sampled* sampler]), :doc "\nReturns a flow running an arbitrary number of sampled flows concurrently with a sampler flow. The process is ready to\ntransfer when the sampler is ready to transfer. On transfer, all ready inputs are transferred, the function is called\nwith the latest value of each input and the result is returned. If a sampled input emits consecutive values, all of\nthem are transferred and only the latest one is retained. Each sampled input must be initially ready.\n\nWhen the sampler input terminates, all sampled inputs are cancelled. Input failures and exceptions thrown by `f` cancel\nthe process, and propagate the error. The process terminates when all input flows are terminated. Cancelling the process\ncancels the sampler input.\n\nExample :\n```clojure\n(defn sleep-emit [delays]\n (ap (let [n (?> (seed delays))]\n (? (sleep n n)))))\n\n(defn delay-each [delay input]\n (ap (? (sleep delay (?> input)))))\n\n(m/? (->> (m/sample vector\n (m/reductions {} 0 (sleep-emit [24 79 67 34]))\n (sleep-emit [86 12 37 93]))\n (delay-each 50)\n (m/reduce conj)))\n\n#_=> [[24 86] [24 12] [79 37] [67 93]]\n```", :type :var} {:name seed, :file "missionary/core.cljc", :line 483, :arglists ([coll]), :doc "\nReturns a discrete flow producing values from given `collection`. Cancelling before having reached the end makes the flow fail immediately.", :type :var} {:name sem, :file "missionary/core.cljc", :line 416, :arglists ([] [n]), :doc "\nCreates a semaphore initialized with n tokens (1 if not provided, aka mutex).\n\nA semaphore is a function implementing `release` on 0-arity and `acquire` on 2-arity (as task). `release` immediately makes a token available and returns nil. `acquire` is a task completing with nil as soon as a token is available.\n\nCancelling an `acquire` task makes it fail immediately.\n\nExample : dining philosophers\n```clojure\n(defn phil [name f1 f2]\n (m/sp\n (while true\n (prn name :thinking)\n (m/? (m/sleep 500))\n (m/holding f1\n (m/holding f2\n (prn name :eating)\n (m/? (m/sleep 600)))))))\n\n(def forks (vec (repeatedly 5 m/sem)))\n\n(m/? (m/timeout\n (m/join vector\n (phil \"descartes\" (forks 0) (forks 1))\n (phil \"hume\" (forks 1) (forks 2))\n (phil \"plato\" (forks 2) (forks 3))\n (phil \"nietzsche\" (forks 3) (forks 4))\n (phil \"kant\" (forks 0) (forks 4)))\n 10000))\n```", :type :var} {:name signal, :file "missionary/core.cljc", :line 985, :arglists ([flow] [sg flow]), :doc "\nReturns a new publisher exposing successive values of `flow` regardless of subscribers' sampling rate. The set of\ntransferred values must form a semigroup with given function `sg` as the internal binary operation, i.e. `sg` must be\nassociative. If `sg` is not provided, `{}` is used by default, i.e. all values but the latest are discarded.\n\nAs long as the flow process did not terminate spontaneously, running the publisher as a flow registers a subscription.\nCancelling a subscription deregisters it. A new flow process is spawned when the first subscription is registered and\ncancelled when the last subscription is deregistered. After the flow process has terminated spontaneously, every\nregistered subscription and any subsequent subscription terminates immediately after consuming the latest item.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n\n(def !input (atom 1))\n(def main ; this is a reactive computation, the println reacts to input changes\n (let [ 42 ;; 1 second later\n```", :type :var} {:name sp, :file "missionary/core.cljc", :line 278, :arglists ([& body]), :doc "\nReturns a task evaluating `body` (in an implicit `do`) in a new evaluation context and completing its result. Body\nevaluation can be parked by a task with `?`. Cancelling a `sp` process interrupts its evaluation context.", :type :macro} {:name stream, :file "missionary/core.cljc", :line 879, :arglists ([f]), :doc "\nReturns a new publisher distributing successive items emitted by flow `f` while collecting subscribers' backpressure.\n\nAs long as the flow process did not terminate spontaneously, running the publisher as a flow registers a subscription.\nCancelling a subscription deregisters it. A new flow process is spawned when the first subscription is registered and\ncancelled when the last subscription is deregistered. After the flow process has terminated spontaneously, every\nregistered subscription and any subsequent subscription terminates immediately after consuming the current item, if any.\n\nExample :\n```clojure\n(require '[missionary.core :as m])\n\n(def >clock ;; A shared process emitting `nil` every second.\n (m/stream\n (m/ap\n (loop [i 0]\n (m/amb\n (m/? (m/sleep 1000))\n (recur (inc i)))))))\n\n(defn counter [r _] (inc r)) ;; A reducing function counting the number of items.\n\n((m/join vector\n (m/reduce counter 0 (m/eduction (take 3) >clock))\n (m/reduce counter 0 (m/eduction (take 4) >clock)))\n prn prn) ;; After 4 seconds, prints [3 4]\n```", :type :var} {:name stream!, :file "missionary/core.cljc", :line 818, :arglists ([flow]), :doc "Use stream instead.\n", :type :var} {:name subscribe, :file "missionary/core.cljc", :line 635, :arglists ([pub]), :doc "\nReturns a discrete flow subscribing to given `org.reactivestreams.Publisher`.", :type :var} {:name timeout, :file "missionary/core.cljc", :line 148, :arglists ([task delay] [task delay value]), :doc "\nReturns a task running given `task` and completing with its result if available within specified `delay` (in\nmilliseconds). Otherwise, input is cancelled and the process succeeds with `value`, or `nil` if not provided.\n\n```clojure\n(m/? (m/timeout (m/sleep 20 :a) 25 :b)) ;; :a after 20ms\n(m/? (m/timeout (m/sleep 20 :a) 15 :b)) ;; :b after 15ms\n(m/? (m/timeout (m/sleep 20 :a) 15)) ;; nil after 15ms\n```", :type :var} {:name transform, :file "missionary/core.cljc", :line 595, :deprecated true, :doc "Alias for `eduction`\n", :type :var} {:name via, :file "missionary/core.cljc", :line 41, :arglists ([exec & body]), :doc "\nReturns a task evaluating body (in an implicit `do`) on given `java.util.concurrent.Executor` and completing with its result.\n\nCancellation interrupts the evaluating thread.\n\nNot supported on clojurescript.\n\nExample :\n```clojure\n\n```", :type :macro} {:name via-call, :file "missionary/core.cljc", :line 23, :arglists ([e t]), :doc "\nSame as `via`, except the expression to evaluate is provided as a zero-arity function on second argument.\n\nNot supported on clojurescript.\n\n```clojure\n(? (via-call blk read-line))\n;; reads a line from stdin and returns it\n```", :type :var} {:name watch, :file "missionary/core.cljc", :line 549, :arglists ([r]), :doc "\nReturns a continuous flow reflecting the current state of a reference type. `reference` must support `add-watch`,\n`remove-watch` and `deref`. On initialization, the process is ready to transfer. On transfer, the current state is\nreturned. Whenever the state of the reference changes and a transfer is not pending, the process becomes ready to\ntransfer again. Cancelling the process makes it fail immediately with an instance of `missionary.Cancelled` and\nterminates the process.", :type :var} {:name zip, :file "missionary/core.cljc", :line 750, :arglists ([c f & fs]), :doc "\nReturns a discrete flow running given discrete `flows` concurrently and emitting the result of applying `f` to the set of first values emitted by each upstream flow, followed by the result of applying `f` to the set of second values and so on, until any upstream flow terminates, at which point the flow will cancel all other upstream flows and wait for their termination.\n\nCancelling propagates to every upstream flow. If any upstream flow fails or if `f` throws, the flow is cancelled.\n\nExample :\n```clojure\n(m/? (->> (m/zip vector\n (m/seed [1 2 3])\n (m/seed [:a :b :c]))\n (m/reduce conj)))\n#_=> [[1 :a] [2 :b] [3 :c]]\n```", :type :var})} {:name missionary.impl.Buffer, :publics ({:name flow, :file "missionary/impl/Buffer.cljs", :line 64, :type :var} {:name kill, :file "missionary/impl/Buffer.cljs", :line 51, :arglists ([ps]), :type :var} {:name more, :file "missionary/impl/Buffer.cljs", :line 18, :arglists ([ps]), :type :var} {:name transfer, :file "missionary/impl/Buffer.cljs", :line 35, :arglists ([ps]), :type :var})} {:name missionary.impl.Dataflow, :publics ({:name make, :file "missionary/impl/Dataflow.cljs", :line 27, :arglists ([]), :type :var} {:name nop, :file "missionary/impl/Dataflow.cljs", :line 4, :arglists ([]), :type :var} {:name send-rf, :file "missionary/impl/Dataflow.cljs", :line 5, :arglists ([x !]), :type :var})} {:name missionary.impl.Eduction, :publics ({:name cancel, :file "missionary/impl/Eduction.cljs", :line 60, :arglists ([t]), :type :var} {:name feed, :file "missionary/impl/Eduction.cljs", :line 18, :arglists ([t] [t x]), :type :var} {:name pull, :file "missionary/impl/Eduction.cljs", :line 26, :arglists ([t]), :type :var} {:name run, :file "missionary/impl/Eduction.cljs", :line 73, :arglists ([xf flow n t]), :type :var} {:name transfer, :file "missionary/impl/Eduction.cljs", :line 63, :arglists ([t]), :type :var})} {:name missionary.impl.Heap, :publics ({:name create, :file "missionary/impl/Heap.cljs", :line 3, :arglists ([cap]), :type :var} {:name dequeue, :file "missionary/impl/Heap.cljs", :line 24, :arglists ([heap]), :type :var} {:name enqueue, :file "missionary/impl/Heap.cljs", :line 10, :arglists ([heap i]), :type :var} {:name size, :file "missionary/impl/Heap.cljs", :line 7, :arglists ([heap]), :type :var})} {:name missionary.impl.Mailbox, :publics ({:name make, :file "missionary/impl/Mailbox.cljs", :line 28, :arglists ([]), :type :var} {:name nop, :file "missionary/impl/Mailbox.cljs", :line 4, :arglists ([]), :type :var})} {:name missionary.impl.Never, :publics ({:name cancel, :file "missionary/impl/Never.cljs", :line 8, :arglists ([ps]), :type :var} {:name run, :file "missionary/impl/Never.cljs", :line 13, :arglists ([f]), :type :var})} {:name missionary.impl.Propagator, :publics ({:name accept, :file "missionary/impl/Propagator.cljs", :line 176, :arglists ([sub]), :type :var} {:name attach, :file "missionary/impl/Propagator.cljs", :line 129, :arglists ([n s]), :type :var} {:name bind, :file "missionary/impl/Propagator.cljs", :line 223, :arglists ([ps f]), :type :var} {:name cancel, :file "missionary/impl/Propagator.cljs", :line 78, :arglists ([ps]), :type :var} {:name children, :file "missionary/impl/Propagator.cljs", :line 33, :type :var} {:name context, :file "missionary/impl/Propagator.cljs", :line 31, :type :var} {:name dequeue, :file "missionary/impl/Propagator.cljs", :line 55, :arglists ([pub]), :type :var} {:name detach, :file "missionary/impl/Propagator.cljs", :line 154, :arglists ([s]), :type :var} {:name dispatch, :file "missionary/impl/Propagator.cljs", :line 139, :arglists ([s]), :type :var} {:name done, :file "missionary/impl/Propagator.cljs", :line 314, :arglists ([]), :type :var} {:name enqueue, :file "missionary/impl/Propagator.cljs", :line 70, :arglists ([r p]), :type :var} {:name enter, :file "missionary/impl/Propagator.cljs", :line 73, :arglists ([pub]), :type :var} {:name exit, :file "missionary/impl/Propagator.cljs", :line 104, :arglists ([ctx held p s]), :type :var} {:name failure, :file "missionary/impl/Propagator.cljs", :line 301, :arglists ([x]), :type :var} {:name flow, :file "missionary/impl/Propagator.cljs", :line 346, :arglists ([initp inits perform subscribe step done tick accept reject flow]), :type :var} {:name foreach, :file "missionary/impl/Propagator.cljs", :line 166, :arglists ([ctx subs f]), :type :var} {:name getp, :file "missionary/impl/Propagator.cljs", :line 283, :arglists ([]), :type :var} {:name gets, :file "missionary/impl/Propagator.cljs", :line 289, :arglists ([]), :type :var} {:name link, :file "missionary/impl/Propagator.cljs", :line 48, :arglists ([x y]), :type :var} {:name lt, :file "missionary/impl/Propagator.cljs", :line 35, :arglists ([x y]), :type :var} {:name pending, :file "missionary/impl/Propagator.cljs", :line 322, :arglists ([f]), :type :var} {:name propagate, :file "missionary/impl/Propagator.cljs", :line 82, :arglists ([ctx]), :type :var} {:name ranks, :file "missionary/impl/Propagator.cljs", :line 265, :arglists ([]), :type :var} {:name resolve, :file "missionary/impl/Propagator.cljs", :line 337, :arglists ([]), :type :var} {:name schedule, :file "missionary/impl/Propagator.cljs", :line 326, :arglists ([]), :type :var} {:name setp, :file "missionary/impl/Propagator.cljs", :line 286, :arglists ([x]), :type :var} {:name sets, :file "missionary/impl/Propagator.cljs", :line 292, :arglists ([x]), :type :var} {:name step, :file "missionary/impl/Propagator.cljs", :line 306, :arglists ([]), :type :var} {:name sub, :file "missionary/impl/Propagator.cljs", :line 242, :arglists ([pub lcb rcb]), :type :var} {:name success, :file "missionary/impl/Propagator.cljs", :line 295, :arglists ([x]), :type :var} {:name task, :file "missionary/impl/Propagator.cljs", :line 343, :arglists ([initp inits perform subscribe success failure tick task]), :type :var} {:name time, :file "missionary/impl/Propagator.cljs", :line 277, :arglists ([]), :type :var} {:name transfer, :file "missionary/impl/Propagator.cljs", :line 280, :arglists ([]), :type :var} {:name unsub, :file "missionary/impl/Propagator.cljs", :line 195, :arglists ([sub]), :type :var} {:name waiting, :file "missionary/impl/Propagator.cljs", :line 318, :arglists ([f]), :type :var})} {:name missionary.impl.RaceJoin, :publics ({:name cancel, :file "missionary/impl/RaceJoin.cljs", :line 13, :arglists ([j]), :type :var} {:name run, :file "missionary/impl/RaceJoin.cljs", :line 27, :arglists ([r c ts s f]), :type :var} {:name terminated, :file "missionary/impl/RaceJoin.cljs", :line 17, :arglists ([j]), :type :var})} {:name missionary.impl.Reactor, :publics ({:name ack, :file "missionary/impl/Reactor.cljs", :line 125, :arglists ([pub]), :type :var} {:name cancel, :file "missionary/impl/Reactor.cljs", :line 191, :arglists ([pub]), :type :var} {:name current, :file "missionary/impl/Reactor.cljs", :line 31, :type :var} {:name delayed, :file "missionary/impl/Reactor.cljs", :line 32, :type :var} {:name dequeue, :file "missionary/impl/Reactor.cljs", :line 58, :arglists ([pub]), :type :var} {:name error, :file "missionary/impl/Reactor.cljs", :line 29, :type :var} {:name event, :file "missionary/impl/Reactor.cljs", :line 269, :arglists ([pub]), :type :var} {:name failer, :file "missionary/impl/Reactor.cljs", :line 202, :arglists ([n t e]), :type :var} {:name free, :file "missionary/impl/Reactor.cljs", :line 205, :arglists ([pub]), :type :var} {:name hook, :file "missionary/impl/Reactor.cljs", :line 175, :arglists ([s]), :type :var} {:name kill, :file "missionary/impl/Reactor.cljs", :line 292, :type :var} {:name link, :file "missionary/impl/Reactor.cljs", :line 51, :arglists ([x y]), :type :var} {:name lt, :file "missionary/impl/Reactor.cljs", :line 34, :arglists ([x y]), :type :var} {:name propagate, :file "missionary/impl/Reactor.cljs", :line 131, :arglists ([pub]), :type :var} {:name publish, :file "missionary/impl/Reactor.cljs", :line 319, :arglists ([flow continuous]), :type :var} {:name pull, :file "missionary/impl/Reactor.cljs", :line 81, :arglists ([pub]), :type :var} {:name push, :file "missionary/impl/Reactor.cljs", :line 247, :arglists ([s]), :type :var} {:name run, :file "missionary/impl/Reactor.cljs", :line 310, :arglists ([init s f]), :type :var} {:name sample, :file "missionary/impl/Reactor.cljs", :line 96, :arglists ([pub]), :type :var} {:name schedule, :file "missionary/impl/Reactor.cljs", :line 73, :arglists ([pub]), :type :var} {:name stale, :file "missionary/impl/Reactor.cljs", :line 28, :type :var} {:name subscribe, :file "missionary/impl/Reactor.cljs", :line 210, :arglists ([pub n t]), :type :var} {:name touch, :file "missionary/impl/Reactor.cljs", :line 104, :arglists ([pub]), :type :var} {:name unsubscribe, :file "missionary/impl/Reactor.cljs", :line 224, :arglists ([s]), :type :var} {:name zero, :file "missionary/impl/Reactor.cljs", :line 308, :type :var})} {:name missionary.impl.Rendezvous, :publics ({:name make, :file "missionary/impl/Rendezvous.cljs", :line 29, :arglists ([]), :type :var} {:name nop, :file "missionary/impl/Rendezvous.cljs", :line 4, :arglists ([]), :type :var})} {:name missionary.impl.Seed, :publics ({:name cancel, :file "missionary/impl/Seed.cljs", :line 12, :arglists ([ps]), :type :var} {:name more, :file "missionary/impl/Seed.cljs", :line 15, :arglists ([ps i]), :type :var} {:name run, :file "missionary/impl/Seed.cljs", :line 28, :arglists ([coll n t]), :type :var} {:name transfer, :file "missionary/impl/Seed.cljs", :line 21, :arglists ([ps]), :type :var})} {:name missionary.impl.Semaphore, :publics ({:name make, :file "missionary/impl/Semaphore.cljs", :line 23, :arglists ([n]), :type :var} {:name nop, :file "missionary/impl/Semaphore.cljs", :line 4, :arglists ([]), :type :var})} {:name missionary.impl.Sleep, :publics ({:name cancel, :file "missionary/impl/Sleep.cljs", :line 11, :arglists ([s]), :type :var} {:name run, :file "missionary/impl/Sleep.cljs", :line 17, :arglists ([d x s f]), :type :var})} {:name missionary.impl.Zip, :publics ({:name cancel, :file "missionary/impl/Zip.cljs", :line 24, :arglists ([ps]), :type :var} {:name ready, :file "missionary/impl/Zip.cljs", :line 10, :arglists ([ps]), :type :var} {:name run, :file "missionary/impl/Zip.cljs", :line 48, :arglists ([f fs s d]), :type :var} {:name transfer, :file "missionary/impl/Zip.cljs", :line 31, :arglists ([ps]), :type :var})})}, :pom-str "\n\n 4.0.0\n missionary\n missionary\n b.39\n missionary\n A functional effect and streaming system for clojure and clojurescript.\n https://github.com/leonoel/missionary\n \n \n Eclipse Public License\n https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html\n \n \n \n scm:git:git://github.com/leonoel/missionary.git\n scm:git:ssh://git@github.com/leonoel/missionary.git\n 77b76d9a8152bfba60fb449bfde1ff22bc40d3e8\n https://github.com/leonoel/missionary\n \n \n \n clojars\n Clojars repository\n https://clojars.org/repo\n \n \n \n java\n \n \n src\n \n \n target\n target/classes\n \n \n org.apache.maven.plugins\n maven-compiler-plugin\n 3.12.1\n \n 8\n 8\n UTF-8\n \n \n \n org.apache.maven.plugins\n maven-source-plugin\n 3.3.0\n \n \n attach-sources\n \n jar\n \n \n \n \n \n org.apache.maven.plugins\n maven-resources-plugin\n 2.6\n \n UTF-8\n \n \n \n \n \n \n clojars\n https://repo.clojars.org/\n \n \n \n \n org.clojure\n clojure\n 1.11.1\n \n \n cloroutine\n cloroutine\n 12\n \n \n org.reactivestreams\n reactive-streams\n 1.0.4\n \n \n\n"}