{"comment":{"url":"https://api.github.com/repos/rvantonder/bap-plugins/comments/17009250","html_url":"https://github.com/rvantonder/bap-plugins/commit/295db57760f9fbdd8996fd887f7b4bdded07e777#commitcomment-17009250","id":17009250,"user":{"login":"ivg","id":2336698,"avatar_url":"https://avatars.githubusercontent.com/u/2336698?v=3","gravatar_id":"","url":"https://api.github.com/users/ivg","html_url":"https://github.com/ivg","followers_url":"https://api.github.com/users/ivg/followers","following_url":"https://api.github.com/users/ivg/following{/other_user}","gists_url":"https://api.github.com/users/ivg/gists{/gist_id}","starred_url":"https://api.github.com/users/ivg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivg/subscriptions","organizations_url":"https://api.github.com/users/ivg/orgs","repos_url":"https://api.github.com/users/ivg/repos","events_url":"https://api.github.com/users/ivg/events{/privacy}","received_events_url":"https://api.github.com/users/ivg/received_events","type":"User","site_admin":false},"position":17,"line":17,"path":"ddg-cdg-pdg/bap_ir_ddg.ml","commit_id":"295db57760f9fbdd8996fd887f7b4bdded07e777","created_at":"2016-04-07T16:05:13Z","updated_at":"2016-04-07T16:05:13Z","body":"Or, we can rewrite this using our `Move` abstraction as:\r\n```\r\nlet find_definition sub v = \r\n   with_return_option (fun {return} -> \r\n        let check (type t) (module T : Move with type t = t) t () = \r\n           if Var.equal (T.lhs t) v then return (Term.tid t) in \r\n        (object inherit [unit] Term.visitor\r\n           method! enter_arg = check (module Arg)\r\n           method! enter_phi = check (module Phi)\r\n           method! enter_def = check (module Def)\r\n        end)#visit_sub sub ())\r\n```\r\n\r\nBut this is actually more bytes of code."}}