stream.slice impl