type class VS struct/functor