Can't you use Observable.choose ? something like that:
let o1 : IObservable<int option> =
If you have a type that is not an option, say:
type TwoSubcases<'a,'b> = | Case1 of 'a | Case2 of 'b
and partial active template:
let (|SecondCase|_|) = function | Case1 _ -> None | Case2 b -> Some b
then you can do:
let o1 : IObservable<TwoSubcases<int, float>> = // ... let o2 : IObservable<float> = Observable.choose (|SecondCase|_|) o1
source share