list.ml
spin
spin.ansi
spin.inquire
spin.std
spin.template
1 2 3 4 5 6 7 8 9 10 11 12 13 include Stdlib.List let index f t = let rec aux acc = function | [] -> raise Not_found | el :: rest -> if f el then acc else aux (acc + 1) rest in aux 0 t
1 2 3 4 5 6 7 8 9 10 11 12 13
include Stdlib.List let index f t = let rec aux acc = function | [] -> raise Not_found | el :: rest -> if f el then acc else aux (acc + 1) rest in aux 0 t