More generalized printList