ocsigen / reactiveData

Functional reactive programming with incremental changes in data structures
http://ocsigen.github.io/reactiveData/dev/
Other
52 stars 10 forks source link

Missing function : 'a data React.S.t -> 'a t #4

Closed balat closed 9 years ago

balat commented 10 years ago

I think a function with this type would be useful to make possible to use the old semantics or module R (before ReactiveData).

hhugo commented 10 years ago

Is that what you want ?

val make_from_signal s =
  make_from (React.S.value s) (React.E.map (fun e -> Set e) (React.S.changes s))
balat commented 10 years ago

Yes exactly. I think it's quite common to use that.

Drup commented 10 years ago

I agree. Especially since the function, while short, is not completely trivial.