'emit(events)' call should be replaced with 'emit(events.toList())' to make sure that the downstream operators work on the immutable list. The original list gets cleared in the next line so downstream operator may receive an empty list.
Senior Software Engineer at Noom, formerly Team Lead Engineering at XING. I intend to write about functional programming and occasionally some random engineering topic.
'emit(events)' call should be replaced with 'emit(events.toList())' to make sure that the downstream operators work on the immutable list. The original list gets cleared in the next line so downstream operator may receive an empty list.
Thanks, good catch!