While some functions in the Stream module may return the `Stream` struct,
you must never explicitly check for the `Stream` struct, as streams
may come in several shapes, such as `IO.Stream`, `File.Stream`, or
even `Range`s.

The functions in the Stream module only guarantee to return enumerables
and their implementation (structs, anonymous functions, etc) may
change at any time. For example, a function that returns an anonymous
function today may return a struct in future releases.

Instead of checking for a particular type, you must instead write
assertive code that assumes you have an enumerable, using the functions
in the `Enume` or `Stream` module accordingly.

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4J2oazhCW%2BPrZ-4xtD-7AWZ5890Yd1PVqk0b9KfN3-wmw%40mail.gmail.com.

Reply via email to