package rocq-runtime
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b236dc44f92e1eeca6877c7ee188a90c2303497fe7beb99df711ed5a7ce0d824
doc/rocq-runtime.clib/CArray/Smart/index.html
Module CArray.SmartSource
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.
Smart.map f a behaves as map f a but returns a instead of a copy when f x == x for all x in a.
Smart.map2 f a b behaves as map2 f a b but returns a instead of a copy when f x y == y for all x in a and y in b pointwise.
Smart.fold_left_map f a b behaves as fold_left_map but returns b as second component instead of a copy of b when the output array is pointwise the same as the input array b
Smart.fold_left_map_i f a b behaves as fold_left_map_i but returns b as second component instead of a copy of b when the output array is pointwise the same as the input array b
val fold_left2_map :
('a -> 'b -> 'c -> 'a * 'c) ->
'a ->
'b array ->
'c array ->
'a * 'c arraySmart.fold_left2_map f a b c behaves as fold_left2_map but returns c as second component instead of a copy of c when the output array is pointwise the same as the input array c