No title

Anonymous Coward 2018-03-03 22:50:23.363779 UTC

1never
2\_ _ -> empty
3
4occur(dt, x, k) where dt >= 0
5\t0 t -> empty when t < te
6 single x when t = te
7 [k] te t when t > te
8 where te = t0 + dt
9
10merge(e1,e2)
11\t0 t -> [e1] t0 t ++ [e2] t0 t
12
13snap(e, b)
14\t0 t -> map (\f -> f ([b] t0 t)) ([e] t0 t)
15
16pure(x)
17\_ _ -> x
18
19clock(x)
20\t0 t -> x + (t - t0)
21
22until(e, b)
23\t0 t -> [b] t0 t when t <= te
24 [last ([e] t0 te)] te t when t > te
25 where te = min {t | t >= t0, [e] t0 t non-empty }
26
27
28map(f,e)
29\t0 t -> map f ([e] t0 t)
30
31map(f,b)
32\t0 t -> f ([b] t0 t)
33
34ap(bf, bx)
35\t0 t -> [bf] t0 t ([bx] t0 t)