Core tools for working with streams