Closure (computer programming)
The filter function then runs the closure on each book in the list to pick which books to return. Because the closure itself has a reference to threshold, the closure can use that value each time filter runs the closure. The function filter itself might be written in a completely separate file.