($) [Note.Logr] | f $ v is app f v .
|
(&&) [Note.S.Bool] | s0 && s1 is l2 ( && ) s1 s2 .
|
(||) [Note.S.Bool] | s0 || s1 is l2 ( || ) s1 s2 .
|
A | |
accum [Note.S] | accum i e is hold i (E.accum i e) .
|
accum [Note.E] | accum i e accumulates a value, starting with i , using e 's
functional occurrences.
|
app [Note.S] | app sf s holds the value of sf applied to the value of s ,
[app sf s ]t = [sf ]t [s ]t.
|
app [Note.Logr] | app f v is the observation that result from applying the
changes of f to the ones of v .
|
B | |
bind [Note.S.Option] | bind ~eq s f is map ~eq (fun v -> Option.bind v f) s .
|
bind [Note.S] | bind s f is the signal that results from applying f to
s , [bind s f ]t = [f[s ]t]t.
|
bind [Note.E.Option] | bind e f is map (fun v -> Option.bind v f) e .
|
bind [Note.E] | bind e f is the event that results from applying f to
the last event of e :
[bind e f ]t = [f v ]t if [e ]<=t = Some v ., [bind e f ]t = never if [e ]<=t = None .
|
C | |
changes [Note.S] | changes s occurs with the value of s whenever it changes.
|
const [Note.S] | const v is always v , [const v ]t = v .
|
const [Note.Logr] | const v never changes and always observes v .
|
create [Note.S] | create v is a primitive signal set to the value v and a
set function.
|
create [Note.E] | create () is a primitive event e and a send function.
|
create [Note.Logr] | create ~now o is a logger that observes changes to o .
|
create [Note.Step] | create () is a new update step.
|
D | |
delay [Note.S] | delay i (lazy s) is the value s had an infinitesimal amount
of time before:
[delay i (lazy s) ]t = i for t = 0. , [delay i (lazy s) ]t = [s' ]t-dt otherwise.
|
destroy [Note.Logr] | destroy l destroys log l this ensure that l 's does not
observe any change again.
|
E | |
edge [Note.S.Bool] | edge s is changes s .
|
eq [Note.S.Option] | eq f derives an equality function on options using f for
testing Some _ .
|
eq [Note.S] | eq s is s 's equality function.
|
execute [Note.Step] | execute step executes the update step step .
|
F | |
fall [Note.S.Bool] | fall s is
E.filter_map (function true -> None | None -> Some b) (edge s)
|
false' [Note.S.Bool] | false' is const false .
|
filter [Note.E] | filter p e are the occurences of e that satisfy p .
|
filter_map [Note.E] | filter_map fm e are e 's occurrences filtered and mapped by fm .
|
fix [Note.S] |
In
fix sf , sf is called with a signal s that represents
|
fix [Note.E] | fix ef allows to refer to the value an event had an
infinitesimal amount of time before.
|
flip [Note.S.Bool] | flip ~init e is a signal whose boolean value flips each time
e occurs.
|
force [Note.Logr] | force l observes l even if nothing changed.
|
fst [Note.S.Pair] | fst s is map fst s .
|
fst [Note.E.Pair] | fst e is map fst e .
|
G | |
get [Note.S.Option] | get s is map ~eq Option.get s .
|
get [Note.E.Option] | get e is map get e .
|
H | |
hold [Note.S] | hold i e has the value of e 's last occurrence or the
value of i provides the signal value at creation time if
there's no event at that time.
|
hold [Note.Logr] | hold l holds logger l to ensure it does not get garbage
collected.
|
hold_value [Note.S.Option] | hold_value i s is the last Some _ value of s or
i if there was no such value:
[hold_some i s ]t = i if [s ]<t = None , [hold_some i s ]t = v if [s ]<=t = Some v
Uses s 's equality on Some _ .
|
I | |
is_none [Note.S.Option] | is_none s is map Option.is_none s .
|
is_none [Note.E.Option] | is_none e is map is_none e .
|
is_some [Note.S.Option] | is_some s is map Option.is_some s .
|
is_some [Note.E.Option] | is_some e is map is_some e .
|
J | |
join [Note.S.Option] | join ~eq oos is map ~eq Option.join oos .
|
join [Note.S] | join ss is bind ss (fun s -> s) .
|
join [Note.E.Option] | join e is map Option.join e .
|
join [Note.E] | join ee is bind ee (fun e -> e) .
|
L | |
l1 [Note.S] | |
l2 [Note.S] | |
l3 [Note.S] | |
log [Note.S] | log ?now s f is Logr.(create ~now (const f $ obs s)) .
|
log [Note.E] | log ?now e f is Some (Logr.(create ?now (const f $ obs e)))
if e is not Note.E.never and None otherwise.
|
M | |
map [Note.S.Option] | map ~eq f s is map ~eq Option.map s .
|
map [Note.S] | map f s is s transformed by f ,
[map f s ]t = f [s ]t.
|
map [Note.E.Option] | map f e is map Option.map e .
|
map [Note.E] | map f e applies f to e 's occurrences.
|
may_hold [Note.Logr] | may_hold l holds logger Some l to ensure it does not get
garbage collected.
|
N | |
never [Note.E] | never is a never occuring event, [never ]t = None .
|
none [Note.S.Option] | none is const None .
|
not [Note.S.Bool] | not s is map not s .
|
O | |
obs [Note.S] | obs s is an observation for s .
|
obs [Note.E] | obs e is an observation for e 's occurences.
|
on_some [Note.E.Option] | on_some e is e when Some _ occurs:
[on_some e ]t = Some v if [e ]t = Some (Some v) , [on_some e ]t = None otherwise.
|
R | |
rise [Note.S.Bool] | rise s is
E.filter_map (function true -> Some b | false -> None) (edge s) .
|
rough_value [Note.S] | rough_value s is the current value of s , but in contrast to
Note.S.value it might not be exactly [s ]t.
|
S | |
sample [Note.S] | sample s ~on f samples s at e 's occurrences.
|
sample_filter [Note.S] | sample_filter s on f is E.Option.on_some (sample s ~on f) .
|
select [Note.E] | select el is the occurences of every event in el .
|
snapshot [Note.S] | snapshot ~on s is sample (fun v _ -> v) ~on s .
|
snd [Note.S.Pair] | snd e is map snd e .
|
snd [Note.E.Pair] | snd e is map snd e .
|
some [Note.S.Option] | some s is map (fun v -> Some v) s and uses s 's equality
function to derive the obvious one on options.
|
some [Note.E.Option] | some e is map (fun v -> Some v) e .
|
stamp [Note.E] | stamp e v is map e (fun _ -> v)
|
swap [Note.S] | swap s se is join (hold ~eq:( == ) s se) that is the values of
s followed by values of the last signal that occured on se .
|
swap [Note.E] | swap es is the current event of es ,
[swap es ]t = [[es ]t]t.
|
T | |
true' [Note.S.Bool] | true' is const true .
|
U | |
unhold_all [Note.Logr] | |
until [Note.S] | until ~limit ~init ~next s is s until next occurs, after
which the value s had just before (limit is false , default)
or whenever next occurs (limit is true ) is kept forever.
|
until [Note.E] | until ~limit ~next e is e 's occurences until next
occurs.
|
V | |
v [Note.S.Pair] | v s0 s1 is l2 (fun x y -> (x, y) s0 s1 .
|
v [Note.E.Pair] | v e0 e1 pair simultaneous occurences of e0 and e1 :
[v e0 e1 ]t = Some (v0, v1) if [e0 ]t = Some v0
and [e1 ]t = Some v1 , [v e0 e1 ]t = None otherwise.
|
value [Note.S.Option] | value s ~default is default when s is None :
[value s ~default ]t = v if [s ]t = Some v , [value s ~default ]t =
[default ]t if [s ]t = None
default 's equality function is used for the resulting signal.
|
value [Note.S] | value s is the current value of s , [s ]t
|
value [Note.E.Option] | value e default is default when e occurs with None :
[value e ~default ]t = None if [e ]t = None , [value e ~default ]t = Some v
if [e ]t = Some (Some v) , [value e ~default ]t = [default ]t if [e ]t
= Some None
|
value [Note.E] | value e is the value of event e at call time.
|
W | |
with_eq [Note.S] | with_eq eq s is s with equality function eq .
|