Neat generator function for splicing up a list.