refactored implementation of list::init using reverse and tail