let init n ~f = if n < 0 then empty () else ( let aux i = if i < n then Some (f i) else None in from aux )