4 ms·
Let me try Functor: You have a structure of values of some type. You want to apply a function to these values inside the structure, but you don't know how to do
by pwm 8y ago
Let me try Functor: You have a structure of values of some type. You want to apply a function to these values inside the structure, but you don't know how to do that. Luckily the structure itself does, so you just give your function to the structure and it applies it to its values for you. Structures that know how to apply functions to its values are called Functors.