bordoley / rx-reason

Reactive programming library for ReasonML/OCaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rework the observable implementation

bordoley opened this issue · comments

commented

We can probably simplify the call stacks plus enable chaining without lift if Observable is defined as GADT.

type source('a) = (~onNext: 'a => unit, ~onComplete: option(exn) => unit) => Disposable.t;
type t('a) = 
  | Source(source('a)): t('a)
  | Lifted(source('b), Operator.t('a, 'b)): t('a);
commented

Landed this, but I'd like to investigate improving it more.