Added clause to repeatedy take a single element from a list, whilst returning all that's left.