Dominic: implement with spliterators