I don\'t understand how closure is more powerful than class. It looks like I can achieve the same behavior of closure using class. Any help would be appreciated
A closure and a class are two very different things.
It is not correct to say 'A class is more powerful that a closure.' or vise a versa.
They do totally different things.
A closure is in a basic sense, a function call that retains the local variable information from the scope it was created.
A class is a definition of an object. The class defines behavior and the contents of instances of the class.