let array_to_list (func : int -> 'a) array (tas : 'a list) (except : int) = let result = ref tas in for i = 0 to (Array.length array)-1 do if i <> except && array.(i) = 1 then result := (func i)::!result done; !result