From: Luc M. <Luc...@cv...> - 2003-02-26 17:01:08
|
Perhaps it's a dummy question but why List.create doesn't exist ? module AdvancedList = struct let create n v = let rec create_aux l n v = match n with | 0 -> l | _ -> (create_aux (v::l) (n-1) v) in create_aux [] n v;; let rec create_with_fun f n = match n with | 0 -> [] | _ -> f() :: (create_with_fun f (n - 1));; end -- Luc...@cv... |