Caml-Light ou OCaml ?

La liste retournée serait de type (string * int) list.


Ce dont tu aurais besoin s'appelle un anamorphisme ou unfold. Ça n'existe pas dans le module List standard, il y...