NOTE: this question was written with the assumption that Streams behave like iterators in other languages. As the accepted answer says - it cannot work this way, because that would require mutable state! So there's not really any reason why you would want to do this.
Original question
I'm learning Elixir, and have what I think is simple question: Is there an idiomatic way to get an stream over a list in Elixir?
There are lots of functions in the Stream module that I can (ab)use to do this:
mylist = [1,2,3]
stream1 = Stream.map(mylist, fn x -> x end)
stream2 = Stream.concat([mylist])
# etc. etc.
But thus far I haven't found anything for this specific purpose - I was expecting something like iter(list) in Python, or vec.into_iter() in Rust. Does Elixir have something like this? Or is it somehow a non-Elixirian* thing to do?
*Is it "Elixian"? "Elixery"? "Elixious"?