Calling closures via WebAssembly
The official Rust book defines closures as follows:
MDN defines a closure for JavaScript as follows:
In general, closures are self-contained blocks of functionality that are tossed around and used in the code. They can capture and store references to the variables from the context in which they are defined.
Closures and functions are similar except for a subtle difference. Closures will capture the state when it is first created. Then, whenever a closure is called, it closes over...