(>! signal-$ value)
Puts a new value on the signal. Because this function is imperatively mutative, it should be used sparingly outside of signal definitions.
Puts a new value on the signal. Because this function is imperatively mutative, it should be used sparingly outside of signal definitions.
(changed-keys s-$)
(choose selection-$ options)
Returns a signal containing the contents of the signal
keyed by the value of selection
in the options
map.
Returns a signal containing the contents of the signal keyed by the value of `selection` in the `options` map.
(close! s-$ & opts)
Closes the signal. Values will no longer be propogated
to the signal and it can be garbage collected. If the :transitive?
keyed argument is provided, this function will also close any source
signals for which s-$
is the only target.
Closes the signal. Values will no longer be propogated to the signal and it can be garbage collected. If the :transitive? keyed argument is provided, this function will also close any source signals for which `s-$` is the only target.
(closed? s-$)
Returns true if s-$ is a signal and has been closed, false otherwise.
Returns true if s-$ is a signal and has been closed, false otherwise.
(debounce ms s-$)
Returns a signal of the last value emitted on s-$
after ms
millis
have ellapsed since it receieved a value.
Returns a signal of the last value emitted on `s-$` after `ms` millis have ellapsed since it receieved a value.
(delay ms s-$)
Returns each value emitted on s-$
after a delay of ms
millis.
Returns each value emitted on `s-$` after a delay of `ms` millis.
(distinct s-$)
Returns a signal that will suppress consecutively =
values on it's argument.
Returns a signal that will suppress consecutively `=` values on it's argument.
(filter pred s-$)
Returns a signal of values for which the value on s-$ applied to pred
returns truthy.
Returns a signal of values for which the value on s-$ applied to `pred` returns truthy.
(flatten s-$)
(make-signal init proc inputs)
Creates a new signal.
Creates a new signal.
(map proc & signals)
Returns a signal whose value is proc
applied to the values on the signals provided.
Returns a signal whose value is `proc` applied to the values on the signals provided.
(merge & signals)
Takes any number of signals and returns a signal containing the values emitted by any of them.
Takes any number of signals and returns a signal containing the values emitted by any of them.
(partition n s-$)
(pickmap proc s-$)
(pickmap proc s-$ metadata)
s-$
is expected to emit a list of signals.
Returns a signal of the values yielded by
applying proc
to the signal list emitted
on s-$
`s-$` is expected to emit a list of signals. Returns a signal of the values yielded by applying `proc` to the signal list emitted on `s-$`
(pickmerge s-$)
(pickmerge proc s-$)
(pickmerge proc s-$ metadata)
Creates a signal of the values yeilded by calling merge
on the list of signals returned on s-$
after applying proc
.
Creates a signal of the values yeilded by calling `merge` on the list of signals returned on `s-$` after applying `proc`.
(pickzip s-$)
(pickzip proc s-$)
(pickzip proc s-$ metadata)
Creates a signal of the values yeilded by calling zip
on the list of signals returned on s-$
after applying proc
.
Creates a signal of the values yeilded by calling `zip` on the list of signals returned on `s-$` after applying `proc`.
(reduce proc init s-$)
Returns a signal whose value is the result of applying proc to the previous value
of s-$ and it's current value. init
is the initial value of the signal.
Returns a signal whose value is the result of applying proc to the previous value of s-$ and it's current value. `init` is the initial value of the signal.
(sample-on value-$ sample-$)
Returns a signal that emits value-$
's current value when sample
emits a value.
Returns a signal that emits `value-$`'s current value when `sample` emits a value.
(sample-when value-$ sample-$)
Returns a signal that emits new values from value-$
when sample-$
is assigned a truthy value.
Returns a signal that emits new values from `value-$` when `sample-$` is assigned a truthy value.
(signal)
Creates a new signal without a value, the signal can only
ever be updated with >!
.
Creates a new signal without a value, the signal can only ever be updated with `>!`.
(signal-of v)
Creates a new signal containing the value v
Creates a new signal containing the value `v`
(signal? x)
Returns true if x is a signal, false otherwise
Returns true if x is a signal, false otherwise
(slice n s-$)
(splice! to-$ from-$)
Emits the values on to-$
to from-$
Emits the values on `to-$` to `from-$`
(start-with! v s-$)
(subscribe! s-$ update-proc)
(subscribe! s-$ update-proc closed-proc)
Attaches subscriptions to s-$
. update-proc
will get
called with the value when s-$ emits. closed-proc
will
get called when s-$
is closed. Should be used sparingly
as an imperitive escape hatch for signal changes.
Attaches subscriptions to `s-$`. `update-proc` will get called with the value when s-$ emits. `closed-proc` will get called when `s-$` is closed. Should be used sparingly as an imperitive escape hatch for signal changes.
(subscribe-closed! s-$ proc)
Subscribes a listener for the closing of a signal.
Subscribes a listener for the closing of a signal.
(throttle s-$ ms)
Returns new values emitted on s-$
no more than every ms
millis.
Returns new values emitted on `s-$` no more than every `ms` millis.
(unsubscribe! s-$ subscription)
Removes a subscription from s-$
.
Removes a subscription from `s-$`.
(unsubscribe-all! s-$)
Removes all subscriptions from a signal.
Removes all subscriptions from a signal.
(zip & signals)
Takes any number of signals and returns a signal containing a vector of each signals latest value.
Takes any number of signals and returns a signal containing a vector of each signals latest value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close