Literal.k 260 B

123456789101112131415
  1. invoke {
  2. let ob = observer {
  3. push 5
  4. push 7
  5. push Complete
  6. }
  7. assert ob is Observer
  8. assert ob is Observable
  9. var product = 1
  10. ob -> subscribe -> lambda(x) {
  11. reset product *= x
  12. }
  13. assert product == 35
  14. }