Generalising handling of List to traversables