Add iterator functions to list.ml