let range a b =   let r = Array.make (b - a + 1) 0 in   for i = a to b do r.(i - a) <- i done; r