no specification exist for the case of data==[]. Is the function expected to return [], or None or an empty iterator?
4
2
8