Could you use toIterable here to avoid creating the list twice?