Commit 2d531597 authored by POTTIER Francois's avatar POTTIER Francois

New function [Positions.pmap].

parent e7b97a93
......@@ -46,6 +46,12 @@ let map f v =
position = v.position;
}
let pmap f v =
{
value = f v.position v.value;
position = v.position
}
let iter f { value = v } =
f v
......
......@@ -44,6 +44,7 @@ val unknown_pos : 'a -> 'a located
(** [map f v] extends the decoration from [v] to [f v]. *)
val map: ('a -> 'b) -> 'a located -> 'b located
val pmap: (t -> 'a -> 'b) -> 'a located -> 'b located
(** [iter f dv] applies [f] to the value inside [dv]. *)
val iter: ('a -> unit) -> 'a located -> unit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment