Implement Stream.cast