tenderowls / moorka

ABANDONED
21 stars 5 forks source link

Merge and Or leaks #86

Open fomkin opened 8 years ago

fomkin commented 8 years ago
// This functions returns new Rxes
val source1: Rx[B] = ???
val source2: Rx[B] = ???

def foo(): Rx[A] = source1.map(_.a)
def bar(): Rx[A] = source2.map(_.a)

FSM(...) {
  case ... => 
    // Objects created inside foo() and bar() will be live forever
    // and runs every source change
    foo() merge bar() 
}