What is the exact definition of a closure?

后端 未结 8 1128
执念已碎
执念已碎 2020-11-28 09:43

I\'ve read through previous topics on closures on stackflow and other sources and one thing is still confusing me. From what I\'ve been able to piece together technically a

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 10:07

    An object is state plus function. A closure, is function plus state.

    function f is a closure when it closes over (captured) x

提交回复
热议问题