Use <functional> to save some space
Anyway, do not invent the wheels again.