extension Observable where E: EnumConvertibleX { func sequence() -> EnumX<Observable<E.Case0>, Observable<E.Case1>, ....> }
こうか~~~es.bind { (es) -> Disposable in switch es.sequence() { case .case0(let c0s): return c0s.subscribe(c0sTarget) case .case1(let c1s): return c1s.subscribe(c1sTarget) case .case2(let c2s): return c2s.subscribe(c2sTarget) ... } } .disposed(by: db)
こんな感じになるかな (edited)