- assert (Array.length p = Array.length q);

- Array.init (Array.length p) ~f:(fun i -> p.(q.(i)))

+ assert (length p = length q);

+ Array.init (length p) ~f:(fun i -> p.(q.(i)))

- let inv = id (Array.length t) in

- for i = 0 to Array.length t - 1 do

+ let inv = Array.create ~len:(length t) 0 in

+ for i = 0 to length t - 1 do

how_long_until ~target:start ~current:(next t start) ~so_far:1

- cycle_length t 0 = ~~Array.~~length t

+ cycle_length t 0 = length t