Rx - flatMap, add take, takeWhile, buffer, foldState, foldLeft