Module ExtS.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 array
- Smart.map f abehaves as- map f abut returns- ainstead of a copy when- f x == xfor all- xin- a.
- val map_i : (int -> 'a -> 'a) -> 'a array -> 'a array
- val map2 : ('a -> 'b -> 'b) -> 'a array -> 'b array -> 'b array
- Smart.map2 f a bbehaves as- map2 f a bbut returns- ainstead of a copy when- f x y == yfor all- xin- aand- yin- bpointwise.