You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
546 B

  1. package nova.monadic_sfx.util
  2. import monix.reactive.Observable
  3. import monix.reactive.Observer
  4. package object reactive {
  5. type MonixProSubject[-I, +O] = Observable[O] with Observer[I]
  6. type Middleware[A, M] = Observable[(A, M)] => Observable[(A, M)]
  7. type Store[A, M] = MonixProSubject[A, (A, M)]
  8. /**
  9. * A Function that applies an Action onto the Stores current state.
  10. * @param reducer The reducing function
  11. * @tparam A The Action Type
  12. * @tparam M The Model Type
  13. */
  14. type Reducer[A, M] = (M, A) => (M, Observable[A])
  15. }