fix a bug in col function
impl ToMatrix for Iterator<T>