What is a 'Closure'?

前端 未结 23 1759
星月不相逢
星月不相逢 2020-11-22 08:02

I asked a question about Currying and closures were mentioned. What is a closure? How does it relate to currying?

23条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 08:50

    In short, function pointer is just a pointer to a location in the program code base (like program counter). Whereas Closure = Function pointer + Stack frame.

    .

提交回复
热议问题