|
|
@ -243,12 +243,11 @@ val rec_record : int -> t
|
|
|
|
val map : t -> f:(t -> t) -> t
|
|
|
|
val map : t -> f:(t -> t) -> t
|
|
|
|
|
|
|
|
|
|
|
|
val map_rec_pre : t -> f:(t -> t option) -> t
|
|
|
|
val map_rec_pre : t -> f:(t -> t option) -> t
|
|
|
|
(** Pre-order transformation that preserves cycles. Each subterm [x] from
|
|
|
|
(** Pre-order transformation. Each subterm [x] from root to leaves is
|
|
|
|
root to leaves is presented to [f]. If [f x = Some x'] then the subterms
|
|
|
|
presented to [f]. If [f x = Some x'] then the subterms of [x] are not
|
|
|
|
of [x] are not traversed and [x] is transformed to [x']. Otherwise
|
|
|
|
traversed and [x] is transformed to [x']. Otherwise traversal proceeds
|
|
|
|
traversal proceeds to the subterms of [x], followed by rebuilding the
|
|
|
|
to the subterms of [x], followed by rebuilding the term structure on the
|
|
|
|
term structure on the transformed subterms. Cycles (through terms
|
|
|
|
transformed subterms. *)
|
|
|
|
involving [RecN]) are preserved. *)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val fold_map : t -> init:'a -> f:('a -> t -> 'a * t) -> 'a * t
|
|
|
|
val fold_map : t -> init:'a -> f:('a -> t -> 'a * t) -> 'a * t
|
|
|
|
|
|
|
|
|
|
|
|