let of_stream e =
let accu =
Accu.create T.empty (fun x -> fst x |> fst)
(fun ((_,r),v) -> Range.(T.add ~data:v ~low:r.lo ~high:r.hi)) in
Stream.iter ~f:(fun loc -> Accu.add accu loc loc ) e ;
Map.of_stream (Accu.stream accu)