avoid boxing certain callables for #332