(all-listeners session)
Returns all listener instances or empty list if none.
Returns all listener instances or empty list if none.
(append-trace listener event)
Appends a trace event and returns a new listener with it.
Appends a trace event and returns a new listener with it.
(create-devtools-listeners ch *event-coords initial-trace)
Returns Clara DelegatingListener that sends listener events through a PersistentFactListener and PersistentSessionEventMessanger constructed with the supplied arguments.
initial-trace
- vector or nil. Passed to fact listener. Defaults to [].- core.async channel that PersistentSessionEventMessenger will put events to
*event-coords
- atom with keys :event-number
, :state-number
, :state-id
.
:event-number
updated within SessionEventMessenger methods.Returns Clara DelegatingListener that sends listener events through a PersistentFactListener and PersistentSessionEventMessanger constructed with the supplied arguments. - `initial-trace` - vector or nil. Passed to fact listener. Defaults to []. - ``ch` - core.async channel that PersistentSessionEventMessenger will put events to ` `*event-coords` - atom with keys `:event-number`, `:state-number`, `:state-id`. `:event-number` updated within SessionEventMessenger methods.
(diff-ops ops)
Returns net result of session changes in order to eliminate ordinal significance of add/remove mutations to view-model
Returns net result of session changes in order to eliminate ordinal significance of add/remove mutations to view-model
(fact-traces session)
Returns [[]...]. List of fact events for each fact listener in the session.
Returns [[]...]. List of fact events for each fact listener in the session.
(ops session)
Returns :added, :removed results. Assumes a single fact listener in the vector of
session's :listeners
that may be a child of a PersistentDelegatingListener.
Returns :added, :removed results. Assumes a single fact listener in the vector of session's `:listeners` that may be a child of a PersistentDelegatingListener.
(replace-listener session)
(replace-listener session listener)
Removes and adds listener(s) from session.
When called with session
only adds PersistentFactListener with initial state of [].
Removes and adds listener(s) from session. When called with `session` only adds PersistentFactListener with initial state of [].
(split-matches-and-tokens matches)
Splits matches into vector of facts, tokens
Splits matches into vector of facts, tokens
(split-ops trace)
Takes trace returned by Clara's get-trace. Returns m of :added, :removed
Takes trace returned by Clara's get-trace. Returns m of :added, :removed
(vec-ops session)
Takes a session with a FactListener and returns the result of the trace as {:added [vector tuples] :removed [vector tuples]}
Takes a session with a FactListener and returns the result of the trace as {:added [vector tuples] :removed [vector tuples]}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close