Hi, i wonder how we will "replicate" Haskell's lazy lists. For example: `str::split` splits a string and returns a list/vector of sub-strings. But maybe we don't want to duplicate those sub-strings in memory and we don't want to create such an intermediate list/vector if we just plan to iterate over it. We could add a `str::split_iter` which calls a block instead. But then we'd need to duplicate every function: one returning a list/vector, and the other taking a block. => interface explosion Am i missing something (e.g. that strings are immutable and the list of strings are just "pointers" to the orignal string)? Do we need lazy sequences? Any other idea? Bye, Lenny
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
