rewrite compilation database entry duplicate detection to functor style
rewrite bear to funcional style