let down_init l f = if l = 0 then [||] else let p = pred l in let res = Array.create l (f p) in for i = pred p downto 0 do Array.unsafe_set res i (f i) done; res