better document the stream() function

Added comments and simple example of use of the stream() function