Commit 86efab60 authored by POTTIER Francois's avatar POTTIER Francois

Define [double] more efficiently.

parent 33e6375c
open Expr12 (* [oexpr] *)
open Expr08 (* [hexpr] *)
let double (e : hexpr) : hexpr =
let double : hexpr -> hexpr =
let v = object
inherit [_] hmap
method! visit_EConst _env k =
EConst (2 * k)
end in
v # visit_'expr () e
v # visit_'expr ()
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