Example of a closure function in Power Query
✓ Published0🌍 Public
HHugoberry
Last edited Oct 14, 2017
Created on Oct 12, 2017
This example shows a closure function in Power Query, where a nested function returns another function that captures and returns a value. The code defines a `ring` function that, when called, produces another function; invoking the first call returns the inner function, and the second call retrieves the `Answer` record. It demonstrates the mechanics of closure and deferred execution, using Power Query’s `let` and `in` syntax. The data source is a hardcoded record, and the rendering is not applicable, as the output is a text result.
AI-generated description