Closed hawkw closed 9 years ago
I should really also go ahead and add a lot of the Rust standard library's collection traits for List
.
This works as of d009dbd, but the list is built in reversed order. This is due to that you can't place a DoubleEndedIterator
type bound on IntoIter
, and therefore there's no way to reverse the source iterator.
Finished by #60.
There are a bunch of times in the Scheme compiler codebase where a
List<T>
is built from aVec<T>
. Since this happens more than once, it probably ought to be made into a reusable function.I was originally considering writing a function in the Scheme package for turning a
Vec<T>
into aList<T>
, but then I realized that the Rust standard library already had me covered with thestd::Iter::FromIterator
trait. I should probably implement this trait forList
.