I’d recommend starting with this thread if you haven’t seen it already: Anonymous functions/lambdas
You’ve probably gathered that it’s a contentious issue because of Zig’s explicit allocation model. Anonymous functions in other languages can be stateful, so we can talk about the “capture” of an anonymous function. Stateless anonymous functions are fairly easy to solve but are verbose (there’s examples in that link I sent you).
One last point about the language here - closures are used quite a lot in Zig (specifically if you are talking about type-erased callbacks). From your original post, it looks like what you’re referring to is a terse-syntax for defining function objects.