Conversation
Notices
-
Carlos Fdez Llamas (sirikon@plaza.remolino.town@plaza.remolino.town)'s status on Friday, 28-Dec-2018 15:40:43 UTC Carlos Fdez Llamas @jartigag @estebanm
The basic idea is, make a function that returns another function.
This way, instead of passing a normal, always-the-same function as a callback to get called eventually, you can "parametrize" the passed function giving extra context.
Here you can see that "echo" returns another function, but that returned function will know about that paremeter sended to "echo".