Module CArray.Smart
The functions defined in this module are optimized specializations of the main ones, when the returned array is of same type as one of the original array.
val map : ('a -> 'a) -> 'a array -> 'a arraySmart.map f abehaves asmap f abut returnsainstead of a copy whenf x == xfor allxina.
val map_i : (int -> 'a -> 'a) -> 'a array -> 'a arrayval map2 : ('a -> 'b -> 'b) -> 'a array -> 'b array -> 'b arraySmart.map2 f a bbehaves asmap2 f a bbut returnsainstead of a copy whenf x y == yfor allxinaandyinbpointwise.