Skip to main content

closure_free_names

Function closure_free_names 

Source
pub fn closure_free_names(params: &[SmolStr], body: &[Expr]) -> Vec<SmolStr>
Expand description

The names an anonymous function reads or writes from the scope it is written in, in the order they first appear.

The caller keeps the ones that name a variable there: those are the closure’s captures, and the rest name declared functions or nothing at all.