Liking cljdoc? Tell your friends :D

rx.lang.clojure.core


cacheclj

(cache xs)

caches the observable value so that multiple subscribers don't re-evaluate it.

See: rx.Observable/cache

caches the observable value so that multiple subscribers don't re-evaluate it.

See:
  rx.Observable/cache
raw docstring

catchcljmacro

(catch p binding & body observable)

Macro version of catch*.

The body of the catch is wrapped in an implicit (do). It must evaluate to an Observable.

Note that the source observable is the last argument so this works with ->> but may look slightly odd when used standalone.

Example:

(->> my-observable ; just emit 0 on IllegalArgumentException (catch IllegalArgumentException e (rx/return 0))

   (catch DependencyException e
     (if (.isMinor e)
       (rx/return 0)
       (rx/throw (WebException. 503)))))

See: catch*

Macro version of catch*.

The body of the catch is wrapped in an implicit (do). It must evaluate to an Observable.

Note that the source observable is the last argument so this works with ->> but may look
slightly odd when used standalone.

Example:

  (->> my-observable
       ; just emit 0 on IllegalArgumentException
       (catch IllegalArgumentException e
         (rx/return 0))

       (catch DependencyException e
         (if (.isMinor e)
           (rx/return 0)
           (rx/throw (WebException. 503)))))

See:
  catch*
raw docstring

catch*clj

(catch* p f o)

Returns an observable that, when Observable o triggers an error, e, continues with Observable returned by (f e) if (p e) is true. If (p e) returns a Throwable that value is passed as e.

If p is a class object, a normal instance? check is performed rather than calling it as a function. If the value returned by (p e) is not true, the error is propagated.

Examples:

(->> my-observable

   ; On IllegalArgumentException, just emit 1
   (catch* IllegalArgumentException
           (fn [e] (rx/return 1)))

   ; If exception message contains "WAT", emit [\W \A \T]
   (catch* (fn [e] (-> e .getMessage (.contains "WAT")))
           (fn [e] (rx/seq->o [\W \A \T]))))

See: rx.Observable/onErrorResumeNext http://netflix.github.io/RxJava/javadoc/rx/Observable.html#onErrorResumeNext(rx.functions.Func1)

Returns an observable that, when Observable o triggers an error, e, continues with
Observable returned by (f e) if (p e) is true. If (p e) returns a Throwable
that value is passed as e.

If p is a class object, a normal instance? check is performed rather than calling it
as a function. If the value returned by (p e) is not true, the error is propagated.

Examples:

  (->> my-observable

       ; On IllegalArgumentException, just emit 1
       (catch* IllegalArgumentException
               (fn [e] (rx/return 1)))

       ; If exception message contains "WAT", emit [\W \A \T]
       (catch* (fn [e] (-> e .getMessage (.contains "WAT")))
               (fn [e] (rx/seq->o [\W \A \T]))))

See:
  rx.Observable/onErrorResumeNext
  http://netflix.github.io/RxJava/javadoc/rx/Observable.html#onErrorResumeNext(rx.functions.Func1)
raw docstring

catch-error-valuecljmacro

(catch-error-value error-observer value & body)

Experimental

TODO: Better name, better abstraction.

Evaluate body and return its value. If an exception e is thrown, inject the given value into the exception's cause and call (on-error error-observer e), returning e.

This is meant to facilitate implementing Observers that call user-supplied code safely. The general pattern is something like:

(fn [o v] (rx/catch-error-value o v (rx/on-next o (some-func v))))

If (some-func v) throws an exception, it is caught, v is injected into the exception's cause (with OnErrorThrowable/addValueAsLastCause) and (rx/on-error o e) is invoked.

See: rx.exceptions.OnErrorThrowable/addValueAsLastCause

Experimental

TODO: Better name, better abstraction.

Evaluate body and return its value.  If an exception e is thrown, inject the
given value into the exception's cause and call (on-error error-observer e),
returning e.

This is meant to facilitate implementing Observers that call user-supplied code
safely. The general pattern is something like:

  (fn [o v]
    (rx/catch-error-value o v
      (rx/on-next o (some-func v))))

If (some-func v) throws an exception, it is caught, v is injected into the
exception's cause (with OnErrorThrowable/addValueAsLastCause) and
(rx/on-error o e) is invoked.

See:
  rx.exceptions.OnErrorThrowable/addValueAsLastCause
raw docstring

concatclj

(concat & xs)

Concatenate the given Observables one after the another.

Note that xs is separate Observables which are concatentated. To concatenate an Observable of Observables, use concat*

See: rx.Observable/concat concat*

Concatenate the given Observables one after the another.

Note that xs is separate Observables which are concatentated. To concatenate an
Observable of Observables, use concat*

See:
  rx.Observable/concat
  concat*
raw docstring

concat*clj

(concat* os)

Concatenate the given Observable of Observables one after another.

See: rx.Observable/concat concat

Concatenate the given Observable of Observables one after another.

See:
  rx.Observable/concat
  concat
raw docstring

consclj

(cons x xs)

cons x to the beginning of xs

cons x to the beginning of xs
raw docstring

countclj

(count xs)

Returns an Observable that emits the number of items is xs as a long.

See: rx.Observable/countLong

Returns an Observable that emits the number of items is xs as a long.

See:
  rx.Observable/countLong
raw docstring

cycleclj

(cycle xs)

Returns an Observable that emits the items of xs repeatedly, forever.

TODO: Other sigs.

See: rx.Observable/repeat clojure.core/cycle

Returns an Observable that emits the items of xs repeatedly, forever.

TODO: Other sigs.

See:
  rx.Observable/repeat
  clojure.core/cycle
raw docstring

distinctclj

(distinct xs)
(distinct key-fn xs)

Returns an Observable of the elements of Observable xs with duplicates removed. key-fn, if provided, is a one arg function that determines the key used to determined duplicates. key-fn defaults to identity.

This implementation doesn't use rx.Observable/distinct because it doesn't honor Clojure's equality semantics.

See: clojure.core/distinct

Returns an Observable of the elements of Observable xs with duplicates
removed. key-fn, if provided, is a one arg function that determines the
key used to determined duplicates. key-fn defaults to identity.

This implementation doesn't use rx.Observable/distinct because it doesn't
honor Clojure's equality semantics.

See:
  clojure.core/distinct
raw docstring

doclj

(do do-fn xs)

Returns a new Observable that, for each x in Observable xs, executes (do-fn x), presumably for its side effects, and then passes x along unchanged.

If do-fn throws an exception, that exception is emitted via onError and the sequence is finished.

Example:

(->> (rx/seq->o [1 2 3]) (rx/do println) ...)

Will print 1, 2, 3.

See: rx.Observable/doOnNext

Returns a new Observable that, for each x in Observable xs, executes (do-fn x),
presumably for its side effects, and then passes x along unchanged.

If do-fn throws an exception, that exception is emitted via onError and the sequence
is finished.

Example:

  (->> (rx/seq->o [1 2 3])
       (rx/do println)
  ...)

Will print 1, 2, 3.

See:
  rx.Observable/doOnNext
raw docstring

dropclj

(drop n xs)

drop-whileclj

(drop-while p xs)

emptyclj

(empty)

Returns an Observable that completes immediately without emitting any values.

See: rx.Observable/empty

Returns an Observable that completes immediately without emitting any values.

See:
  rx.Observable/empty
raw docstring

every?clj

(every? p xs)

Returns an Observable that emits a single true value if (p x) is true for all x in xs. Otherwise emits false.

See: clojure.core/every? rx.Observable/all

Returns an Observable that emits a single true value if (p x) is true for
all x in xs. Otherwise emits false.

See:
  clojure.core/every?
  rx.Observable/all
raw docstring

filterclj

(filter p xs)

finallycljmacro

(finally & body observable)

Macro version of finally*.

Note that the source observable is the last argument so this works with ->> but may look slightly odd when used standalone.

Example:

(->> my-observable (finally (println "Done")))

See: finally*

Macro version of finally*.

Note that the source observable is the last argument so this works with ->> but may look
slightly odd when used standalone.

Example:

  (->> my-observable
       (finally (println "Done")))

See:
  finally*
raw docstring

finally*clj

(finally* f o)

Returns an Observable that, as a side-effect, executes (f) when the given Observable completes regardless of success or failure.

Example:

(->> my-observable (finally* (fn [] (println "Done"))))

Returns an Observable that, as a side-effect, executes (f) when the given
Observable completes regardless of success or failure.

Example:

  (->> my-observable
       (finally* (fn [] (println "Done"))))

raw docstring

firstclj

(first xs)

Returns an Observable that emits the first item emitted by xs, or an empty Observable if xs is empty.

See: rx.Observable/take(1)

Returns an Observable that emits the first item emitted by xs, or an
empty Observable if xs is empty.

See:
  rx.Observable/take(1)
raw docstring

flatmapclj

(flatmap f & xs)

Like mapcat, but the Observables produced by f are merged rather than concatenated. This behavior is preferable in asynchronous contexts where order is not important.

See: mapcat rx.Observable/flatMap

Like mapcat, but the Observables produced by f are merged rather than concatenated.
This behavior is preferable in asynchronous contexts where order is not important.

See:
  mapcat
  rx.Observable/flatMap
raw docstring

flatmap*clj

(flatmap* f xs)

Same as multi-arg flatmap, but input is an Observable of Observables.

See: flatmap

Same as multi-arg flatmap, but input is an Observable of Observables.

See:
  flatmap
raw docstring

fn->predicateclj

(fn->predicate f)

Turn f into a predicate that returns true/false like Rx predicates should

Turn f into a predicate that returns true/false like Rx predicates should
raw docstring

generatorcljmacro

(generator bindings & body)

Create an observable that executes body which should emit values with (rx/on-next observer value) where observer comes from bindings.

Automatically calls on-completed on return, or on-error if any exception is thrown.

The body should exit early if (rx/unsubscribed? observable) returns true

Examples:

; make an observer that emits [0 1 2 3 4] (generator [observer] (dotimes [i 5] (on-next observer i)))

Create an observable that executes body which should emit values with
(rx/on-next observer value) where observer comes from bindings.

Automatically calls on-completed on return, or on-error if any exception is thrown.

The body should exit early if (rx/unsubscribed? observable) returns true

Examples:

  ; make an observer that emits [0 1 2 3 4]
  (generator [observer]
    (dotimes [i 5]
      (on-next observer i)))

raw docstring

generator*clj

(generator* f & args)

Creates an observable that calls (f observer & args) which should emit values with (rx/on-next observer value).

Automatically calls on-completed on return, or on-error if any exception is thrown.

f should exit early if (rx/unsubscribed? observable) returns true

Examples:

; An observable that emits just 99 (rx/generator* on-next 99)

Creates an observable that calls (f observer & args) which should emit values
with (rx/on-next observer value).

Automatically calls on-completed on return, or on-error if any exception is thrown.

f should exit early if (rx/unsubscribed? observable) returns true

Examples:

  ; An observable that emits just 99
  (rx/generator* on-next 99)
raw docstring

group-byclj

(group-by key-fn xs)

Returns an Observable of clojure.lang.MapEntry where the key is the result of (key-fn x) and the val is an Observable of x for each key.

This returns a clojure.lang.MapEntry rather than rx.observables.GroupedObservable for some vague consistency with clojure.core/group-by and so that clojure.core/key, clojure.core/val and destructuring will work as expected.

See: clojure.core/group-by rx.Observable/groupBy rx.observables.GroupedObservable

Returns an Observable of clojure.lang.MapEntry where the key is the result of
(key-fn x) and the val is an Observable of x for each key.

This returns a clojure.lang.MapEntry rather than rx.observables.GroupedObservable
for some vague consistency with clojure.core/group-by and so that clojure.core/key,
clojure.core/val and destructuring will work as expected.

See:
  clojure.core/group-by
  rx.Observable/groupBy
  rx.observables.GroupedObservable
raw docstring

interleaveclj

(interleave o1 & observables)

Returns an Observable of the first item in each Observable, then the second etc.

Each argument is an individual Observable

See: observable* clojure.core/interleave

Returns an Observable of the first item in each Observable, then the second etc.

Each argument is an individual Observable

See:
  observable*
  clojure.core/interleave
raw docstring

interleave*clj

(interleave* observables)

Returns an Observable of the first item in each Observable emitted by observables, then the second etc.

observables is an Observable of Observables

See: interleave clojure.core/interleave

Returns an Observable of the first item in each Observable emitted by observables, then
the second etc.

observables is an Observable of Observables

See:
  interleave
  clojure.core/interleave
raw docstring

interposeclj

(interpose sep xs)

Returns an Observable of the elements of xs separated by sep

See: clojure.core/interpose

Returns an Observable of the elements of xs separated by sep

See:
  clojure.core/interpose
raw docstring

intoclj

(into to from)

Returns an observable that emits a single value which is all of the values of from-observable conjoined onto to

See: clojure.core/into rx.Observable/toList

Returns an observable that emits a single value which is all of the
values of from-observable conjoined onto to

See:
  clojure.core/into
  rx.Observable/toList
raw docstring

iterateclj

(iterate f x)

Returns an Observable of x, (f x), (f (f x)) etc. f must be free of side-effects

See: clojure.core/iterate

Returns an Observable of x, (f x), (f (f x)) etc. f must be free of side-effects

See:
  clojure.core/iterate
raw docstring

keepclj

(keep f xs)

keep-indexedclj

(keep-indexed f xs)

let-ocljmacro

(let-o bindings & result-body)

EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION

Similar to clojure.core/let, but bindings are Observables and the result of the body must be an Observable. Binding names must start with ?. Binding order doesn't matter and any binding is visible to all other expressions as long as no cycles are produced in the resulting Observable expression.

The key difference here is that the macro can identify the dependencies between Observables and correctly connect them, protecting from variations in subscribe behavior as well as the idiosyncracies of setting up multiple subscriptions to Observables.

This is only very useful for constructing graphs of Observables where you'd usually have to fiddle around with publish, connect, replay and all that stuff. If you have a linear sequence of operators, just chain them together.

Current limitations:

  • All Observables are cache()'d so watch out for large sequences. This will be fixed eventually.
  • let-o cannot be nested. Some deep-walking macro-magic will be required for this.

Example:

; Note that both ?c and ?d depend on ?b and the result Observable depends on ; ?c and ?d. (let-o [?a (rx/return 99) ?b (... some observable network request ...) ?c (rx/map vector ?a ?b) ?d (rx/map ... ?b)] (rx/map vector ?c ?d))

See: let-o*

EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION

Similar to clojure.core/let, but bindings are Observables and the result of the body
must be an Observable. Binding names must start with ?. Binding order doesn't matter
and any binding is visible to all other expressions as long as no cycles are produced
in the resulting Observable expression.

The key difference here is that the macro can identify the dependencies between Observables
and correctly connect them, protecting from variations in subscribe behavior as well as
the idiosyncracies of setting up multiple subscriptions to Observables.

This is only very useful for constructing graphs of Observables where you'd usually have
to fiddle around with publish, connect, replay and all that stuff. If you have a linear
sequence of operators, just chain them together.

Current limitations:

  * All Observables are cache()'d so watch out for large sequences. This will be
    fixed eventually.
  * let-o cannot be nested. Some deep-walking macro-magic will be required for this.

Example:

  ; Note that both ?c and ?d depend on ?b and the result Observable depends on
  ; ?c and ?d.
  (let-o [?a (rx/return 99)
          ?b (... some observable network request ...)
          ?c (rx/map vector ?a ?b)
          ?d (rx/map ... ?b)]
    (rx/map vector ?c ?d))

See:
  let-o*
raw docstring

let-o*clj

(let-o* description)

EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION

Given a graph description, returns an observable that emits a single map of observables all hooked up and ready for subscription.

A graph is a map from name to a map with keys:

:deps A vector of dependency names :factory A function that takes a map from name to Observable for the names in :deps and returns an Observable

Returns a map from name to Observable. Additionally, there will be a ::non-terminals key in the map with a vector of non-terminal names.

See: let-o

EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION

Given a graph description, returns an observable that emits a single
map of observables all hooked up and ready for subscription.

A graph is a map from name to a map with keys:

  :deps     A vector of dependency names
  :factory  A function that takes a map from name to Observable
            for the names in :deps and returns an Observable

Returns a map from name to Observable. Additionally, there will be a
::non-terminals key in the map with a vector of non-terminal names.

See:
  let-o
raw docstring

let-realizedcljmacro

(let-realized bindings & body)

EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION

'let' version of realized map.

(let-realized [a (make-observable)] (* 2 a))

is equivalent to:

(->> (realized-map :a (make-observable)) (map (fn [{:keys [a]}] (* 2 a))))

That is, it eliminates the repition of the map keys when you want to do something with the final result.

Evaluates to an Observable that emits the value of the let body.

See: rx.lang.clojure.realized/realized-map rx.lang.clojure.realized/all

EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION

'let' version of realized map.

  (let-realized [a (make-observable)]
    (* 2 a))

is equivalent to:

  (->> (realized-map :a (make-observable))
       (map (fn [{:keys [a]}] (* 2 a))))

That is, it eliminates the repition of the map keys when you want to do something
with the final result.

Evaluates to an Observable that emits the value of the let body.

See:
  rx.lang.clojure.realized/realized-map
  rx.lang.clojure.realized/all
raw docstring

liftclj

(lift op xs)

Lift the Operator op over the given Observable xs

Example:

(->> my-observable (rx/lift (rx/operator ...)) ...)

See: rx.Observable/lift operator

Lift the Operator op over the given Observable xs

Example:

  (->> my-observable
       (rx/lift (rx/operator ...))
       ...)

See:
  rx.Observable/lift
  operator
raw docstring

mapclj

(map f & observables)

Map a function over one or more observable sequences.

Each item from the first Observable is the first arg, each item from the second Observable is the second arg, and so on.

See: clojure.core/map rx.Observable/zip

Map a function over one or more observable sequences.

Each item from the first Observable is the first arg, each item
from the second Observable is the second arg, and so on.

See:
  clojure.core/map
  rx.Observable/zip
raw docstring

map*clj

(map* f observable)

Map a function over an Observable of Observables.

Each item from the first emitted Observable is the first arg, each item from the second emitted Observable is the second arg, and so on.

See: map clojure.core/map rx.Observable/zip

Map a function over an Observable of Observables.

Each item from the first emitted Observable is the first arg, each
item from the second emitted Observable is the second arg, and so on.

See:
  map
  clojure.core/map
  rx.Observable/zip
raw docstring

map-indexedclj

(map-indexed f xs)

Returns an observable that invokes (f index value) for each value of the input observable. index starts at 0.

See: clojure.core/map-indexed

Returns an observable that invokes (f index value) for each value of the input
observable. index starts at 0.

See:
  clojure.core/map-indexed
raw docstring

mapcatclj

(mapcat f & xs)

Returns an observable which, for each value x in xs, calls (f x), which must return an Observable. The resulting observables are concatentated together into one observable.

WARNING: This operator, like clojure.core/mapcat, preserves ordering of the generated Observables. In an asynchronous context, this may cause unintended blocking. Try flatmap instead.

If multiple Observables are given, the arguments to f are the first item from each observable, then the second item, etc.

See: clojure.core/mapcat flatmap rx.Observable/concatMap

Returns an observable which, for each value x in xs, calls (f x), which must
return an Observable. The resulting observables are concatentated together
into one observable.

WARNING: This operator, like clojure.core/mapcat, preserves ordering of the
generated Observables. In an asynchronous context, this may cause unintended
blocking. Try flatmap instead.

If multiple Observables are given, the arguments to f are the first item from
each observable, then the second item, etc.

See:
  clojure.core/mapcat
  flatmap
  rx.Observable/concatMap
raw docstring

mapcat*clj

(mapcat* f xs)

Same as multi-arg mapcat, but input is an Observable of Observables.

See: mapcat clojure.core/mapcat

Same as multi-arg mapcat, but input is an Observable of Observables.

See:
  mapcat
  clojure.core/mapcat
raw docstring

mergeclj

(merge & os)

Merge one or more Observables into a single observable.

If you want clojure.core/merge, it's just this:

(rx/reduce clojure.core/merge {} maps)

See: merge* merge-delay-error rx.Observable/merge

Merge one or more Observables into a single observable.

If you want clojure.core/merge, it's just this:

  (rx/reduce clojure.core/merge {} maps)

See:
  merge*
  merge-delay-error
  rx.Observable/merge
raw docstring

merge*clj

(merge* xs)

Merge an Observable of Observables into a single Observable

If you want clojure.core/merge, it's just this:

(rx/reduce clojure.core/merge {} maps)

See: merge merge-delay-error* rx.Observable/merge

Merge an Observable of Observables into a single Observable

If you want clojure.core/merge, it's just this:

  (rx/reduce clojure.core/merge {} maps)

See:
  merge
  merge-delay-error*
  rx.Observable/merge
raw docstring

merge-delay-errorclj

(merge-delay-error & os)

Same as merge, but all values are emitted before errors are propagated

Same as merge, but all values are emitted before errors are propagated
raw docstring

merge-delay-error*clj

(merge-delay-error* xs)

Same as merge*, but all values are emitted before errors are propagated

Same as merge*, but all values are emitted before errors are propagated
raw docstring

neverclj

(never)

Returns an Observable that never emits any values and never completes.

See: rx.Observable/never

Returns an Observable that never emits any values and never completes.

See:
  rx.Observable/never
raw docstring

nextclj

Returns an observable that emits all but the first element of the input observable.

See: clojure.core/next

Returns an observable that emits all but the first element of the input observable.

See:
  clojure.core/next
raw docstring

nthclj

(nth xs index)
(nth xs index not-found)

Returns an Observable that emits the value at the index in the given Observable. nth throws an IndexOutOfBoundsException unless not-found is supplied.

Note that the Observable is the first arg!

Returns an Observable that emits the value at the index in the given
Observable.  nth throws an IndexOutOfBoundsException unless not-found
is supplied.

Note that the Observable is the *first* arg!
raw docstring

observable*clj

(observable* f)

Create an Observable from the given function.

When subscribed to, (f subscriber) is called at which point, f can start emitting values, etc. The passed subscriber is of type rx.Subscriber.

See: rx.Subscriber rx.Observable/create

Create an Observable from the given function.

When subscribed to, (f subscriber) is called at which point, f can start emitting values, etc.
The passed subscriber is of type rx.Subscriber.

See:
  rx.Subscriber
  rx.Observable/create
raw docstring

observable?clj

(observable? o)

Returns true if o is an rx.Observable

Returns true if o is an rx.Observable
raw docstring

on-completedclj

(on-completed o)

Call onCompleted on the given observer and return o.

Call onCompleted on the given observer and return o.
raw docstring

on-errorclj

(on-error o e)

Call onError on the given observer and return o.

Call onError on the given observer and return o.
raw docstring

on-nextclj

(on-next o value)

Call onNext on the given observer and return o.

Call onNext on the given observer and return o.
raw docstring

operator*clj

(operator* f)

Experimental, subject to change or deletion.

Returns a new implementation of rx.Observable$Operator that calls the given function with a rx.Subscriber. The function should return a rx.Subscriber.

See: lift rx.Observable$Operator

Experimental, subject to change or deletion.

Returns a new implementation of rx.Observable$Operator that calls the given
function with a rx.Subscriber. The function should return a rx.Subscriber.

See:
  lift
  rx.Observable$Operator
raw docstring

partition-allclj

(partition-all n xs)
(partition-all n step xs)

Returns an Observable of Observables of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. the partitions do not overlap. May include partitions with fewer than n items at the end.

See: clojure.core/partition-all rx.Observable/window

Returns an Observable of Observables of n items each, at offsets step
apart. If step is not supplied, defaults to n, i.e. the partitions
do not overlap. May include partitions with fewer than n items at the end.

See:
  clojure.core/partition-all
  rx.Observable/window
raw docstring

rangeclj

(range)
(range end)
(range start end)
(range start end step)

Returns an Observable nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, and end to infinity.

Note: this is not implemented on rx.Observable/range

See: clojure.core/range

Returns an Observable nums from start (inclusive) to end
(exclusive), by step, where start defaults to 0, step to 1, and end
to infinity.

Note: this is not implemented on rx.Observable/range

See:
  clojure.core/range
raw docstring

reduceclj

(reduce f xs)
(reduce f val xs)

reductionsclj

(reductions f xs)
(reductions f val xs)

restclj

Same as rx/next

Same as rx/next
raw docstring

returnclj

(return value)

Returns an observable that emits a single value.

See: rx.Observable/just

Returns an observable that emits a single value.

See:
  rx.Observable/just
raw docstring

seq->oclj

(seq->o xs)

Make an observable out of some seq-able thing. The rx equivalent of clojure.core/seq.

Make an observable out of some seq-able thing. The rx equivalent of clojure.core/seq.
raw docstring

serializeclj

(serialize xs)

Serialize execution.

See: rx.Observable/serialize

Serialize execution.

See:
  rx.Observable/serialize
raw docstring

someclj

(some p xs)

Returns an observable that emits the first logical true value of (pred x) for any x in xs, else completes immediately.

See: clojure.core/some

Returns an observable that emits the first logical true value of (pred x) for
any x in xs, else completes immediately.

See:
  clojure.core/some
raw docstring

sortclj

(sort xs)
(sort comp xs)

Returns an observable that emits the items in xs, where the sort order is determined by comparing items. If no comparator is supplied, uses compare. comparator must implement java.util.Comparator.

See: clojure.core/sort

Returns an observable that emits the items in xs, where the sort order is
determined by comparing items. If no comparator is supplied, uses compare.
comparator must implement java.util.Comparator.

See:
  clojure.core/sort
raw docstring

sort-byclj

(sort-by keyfn xs)
(sort-by keyfn comp xs)

Returns an observable that emits the items in xs, where the sort order is determined by comparing (keyfn item). If no comparator is supplied, uses compare. comparator must implement java.util.Comparator.

See: clojure.core/sort-by

Returns an observable that emits the items in xs, where the sort order is
determined by comparing (keyfn item). If no comparator is supplied, uses
compare. comparator must implement java.util.Comparator.

See:
  clojure.core/sort-by
raw docstring

split-withclj

(split-with p xs)

Returns an observable that emits a pair of observables

[(take-while p xs) (drop-while p xs)]

See: rx.lang.clojure/take-while rx.lang.clojure/drop-while clojure.core/split-with

Returns an observable that emits a pair of observables

  [(take-while p xs) (drop-while p xs)]

See:
  rx.lang.clojure/take-while
  rx.lang.clojure/drop-while
  clojure.core/split-with
raw docstring

subscribeclj

(subscribe o on-next-action)
(subscribe o on-next-action on-error-action)
(subscribe o on-next-action on-error-action on-completed-action)

Subscribe to the given observable.

on-X-action is a normal clojure function.

See: rx.Observable/subscribe

Subscribe to the given observable.

on-X-action is a normal clojure function.

See:
  rx.Observable/subscribe
raw docstring

subscribe-onclj

(subscribe-on s xs)

Cause subscriptions to the given observable to happen on the given scheduler.

Returns a new Observable.

See: rx.Observable/subscribeOn

Cause subscriptions to the given observable to happen on the given scheduler.

Returns a new Observable.

See:
  rx.Observable/subscribeOn
raw docstring

subscriberclj

(subscriber o on-next-action)
(subscriber o on-next-action on-error-action)
(subscriber o on-next-action on-error-action on-completed-action)

Experimental, subject to change or deletion.

Experimental, subject to change or deletion.
raw docstring

subscriptionclj

(subscription handler)

Create a new subscription that calls the given no-arg handler function when unsubscribe is called

See: rx.subscriptions.Subscriptions/create

Create a new subscription that calls the given no-arg handler function when
unsubscribe is called

See:
  rx.subscriptions.Subscriptions/create
raw docstring

takeclj

(take n xs)

Returns an observable that emits the first n elements of xs.

See: clojure.core/take

Returns an observable that emits the first n elements of xs.

See:
  clojure.core/take
raw docstring

take-whileclj

(take-while p xs)

Returns an Observable that emits xs until the first x such that (p x) is falsey.

See: clojure.core/take-while rx.Observable/takeWhile

Returns an Observable that emits xs until the first x such that
(p x) is falsey.

See:
  clojure.core/take-while
  rx.Observable/takeWhile
raw docstring

throwclj

(throw e)

Returns an Observable the simply emits the given exception with on-error

See: rx.Observable/error

Returns an Observable the simply emits the given exception with on-error

See:
  rx.Observable/error
raw docstring

unsubscribeclj

(unsubscribe s)

Unsubscribe from Subscription s and return it.

Unsubscribe from Subscription s and return it.
raw docstring

unsubscribe-onclj

(unsubscribe-on s xs)

Cause unsubscriptions from the given observable to happen on the given scheduler.

Returns a new Observable.

See: rx.Observable/unsubscribeOn

Cause unsubscriptions from the given observable to happen on the given scheduler.

Returns a new Observable.

See:
  rx.Observable/unsubscribeOn
raw docstring

unsubscribed?clj

(unsubscribed? s)

Returns true if the given Subscription (or Subscriber) is unsubscribed.

See: rx.Observable/create observable*

Returns true if the given Subscription (or Subscriber) is unsubscribed.

See:
  rx.Observable/create
  observable*
raw docstring

wrap-on-completedclj

(wrap-on-completed handler)

Wrap handler with code that automaticaly calls rx.Observable.onCompleted.

Wrap handler with code that automaticaly calls rx.Observable.onCompleted.
raw docstring

wrap-on-errorclj

(wrap-on-error handler)

Wrap handler with code that automaticaly calls (on-error) if an exception is thrown

Wrap handler with code that automaticaly calls (on-error) if an exception is thrown
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close