Filter a list into two parts