Liking cljdoc? Tell your friends :D

rx.lang.clojure.interop

Functions an macros for instantiating rx Func* and Action* interfaces.

Functions an macros for instantiating rx Func* and Action* interfaces.
raw docstring

actioncljmacro

(action & fn-form)

Like clojure.core/fn, but returns the appropriate rx.functions.Action* interface.

Example:

(.finallyDo my-observable (rx/action [] (println "Finally!")))

Like clojure.core/fn, but returns the appropriate rx.functions.Action*
interface.

Example:

  (.finallyDo my-observable (rx/action [] (println "Finally!")))

raw docstring

action*clj

(action* f)

Given function f, returns an object that implements rx.functions.Action0-3 by delegating to the given function. Also implements rx.Observable$OnSubscribe which is just an Action1.

Example:

(.subscribe my-observable (rx/action* println))

See: http://netflix.github.io/RxJava/javadoc/rx/functions/Action0.html

Given function f, returns an object that implements rx.functions.Action0-3
by delegating to the given function. Also implements rx.Observable$OnSubscribe which
is just an Action1.

Example:

  (.subscribe my-observable (rx/action* println))

See:
  http://netflix.github.io/RxJava/javadoc/rx/functions/Action0.html
raw docstring

fncljmacro

(fn & fn-form)

Like clojure.core/fn, but returns the appropriate rx.functions.Func* interface.

Example:

(.map my-observable (rx/fn [a] (* 2 a)))

or, to create an Observable:

(Observable/create (rx/fn [observer] (.onNext observer 10) (.onCompleted observer) (Subscriptions/empty)))

See: rx.lang.clojure.interop/fn*

Like clojure.core/fn, but returns the appropriate rx.functions.Func*
interface.

Example:

  (.map my-observable (rx/fn [a] (* 2 a)))

  or, to create an Observable:

  (Observable/create (rx/fn [observer]
                       (.onNext observer 10)
                       (.onCompleted observer)
                       (Subscriptions/empty)))

See:
  rx.lang.clojure.interop/fn*
raw docstring

fn*clj

(fn* f)

Given function f, returns an object that implements rx.functions.Func0-9 by delegating the call() method to the given function.

If the f has the wrong arity, an ArityException will be thrown at runtime.

This will also implement rx.Observable$OnSubscribeFunc.onSubscribe for use with Observable/create. In this case, the function must take an Observable as its single argument and return a subscription object.

Example:

(.reduce my-numbers (rx/fn* +))

See: http://netflix.github.io/RxJava/javadoc/rx/functions/Func0.html

Given function f, returns an object that implements rx.functions.Func0-9
by delegating the call() method to the given function.

If the f has the wrong arity, an ArityException will be thrown at runtime.

This will also implement rx.Observable$OnSubscribeFunc.onSubscribe for use with
Observable/create. In this case, the function must take an Observable as its single
argument and return a subscription object.

Example:

  (.reduce my-numbers (rx/fn* +))

See:
  http://netflix.github.io/RxJava/javadoc/rx/functions/Func0.html
raw docstring

fnN*clj

(fnN* f)

Given function f, returns an object that implements rx.functions.FuncN by delegating to the given function.

Unfortunately, this can't be included in fn* because of ambiguities between the single arg call() method and the var args call method.

See: http://netflix.github.io/RxJava/javadoc/rx/functions/FuncN.html

Given function f, returns an object that implements rx.functions.FuncN
by delegating to the given function.

Unfortunately, this can't be included in fn* because of ambiguities between
the single arg call() method and the var args call method.

See:
  http://netflix.github.io/RxJava/javadoc/rx/functions/FuncN.html
raw docstring

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

× close