Implement Stream.cast

Not sure if the implementation is correct, but I could use it now ;-)