gildor
03/13/2018, 1:36 AMapply
map. map
creates a new observable but you cannot return it from apply
(apply returns receiver instead), so actually you just call map and ignore result.
Also, you cannot map behavior subject because this operation creates a new Observable, so you cannot push values to it, this is not a subject anymore
So the only way to create a new observable each time, like in your first example
As alternative solution, why not just add already filtered values to behaviour subject, subject is private, so you can control that