What's going on here in general is that filter just says give me a function, any function f, and it does not care about the fact that the closure pass then, can have whatever data it needs in its environment. 