mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-07 11:45:41 -05:00
feat(util): add Backtrack_stack.iter
This commit is contained in:
parent
9839e5a36b
commit
6417bbdd80
2 changed files with 4 additions and 0 deletions
|
|
@ -34,3 +34,5 @@ let pop_levels (self:_ t) (n:int) ~f : unit =
|
|||
done;
|
||||
Vec.shrink self.lvls new_lvl
|
||||
)
|
||||
|
||||
let iter ~f self = Vec.iter f self.vec
|
||||
|
|
|
|||
|
|
@ -19,3 +19,5 @@ val push_level : _ t -> unit
|
|||
|
||||
val pop_levels : 'a t -> int -> f:('a -> unit) -> unit
|
||||
(** [pop_levels st n ~f] removes [n] levels, calling [f] on every removed item *)
|
||||
|
||||
val iter : f:('a -> unit) -> 'a t -> unit
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue