PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/src/graph/fvar.ml

http://github.com/hhughes/ocaml-frui
OCaml | 19 lines | 19 code | 0 blank | 0 comment | 0 complexity | 0da6e25297a27e19cdbcfb8e8e2ca800 MD5 | raw file
 1class ['a] fvar (v:'a) =
 2object (self)
 3  val mutable e = Froc.never
 4  val mutable s = snd (Froc.make_event ())
 5  val mutable b = Froc.return v
 6  initializer
 7    begin
 8      let _e,_s = Froc.make_event () in
 9      let _b = Froc.hold v _e in
10      e <- _e;
11      s <- _s;
12      b <- _b
13    end
14  method e = e
15  method s = s
16  method b = b
17  method get = Froc.sample b
18  method set v = Froc.send s v
19end