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