Implementing list->vector