expr08double.ml 206 Bytes
Newer Older
1 2 3
open Expr12 (* [oexpr] *)
open Expr08 (* [hexpr] *)

4
let double : hexpr -> hexpr =
5
  let v = object
POTTIER Francois's avatar
POTTIER Francois committed
6
    inherit [_] hmap
7 8 9
    method! visit_EConst _env k =
      EConst (2 * k)
  end in
10
  v # visit_'expr ()