I think what you want to happen is what's happening.  `filter_proc` is called just once.  Within `filter_proc`, but _outside of_ `->(w) { f.include?(w.downcase) }`, the line marked _THIS LINE HERE_  creates the list of words--just once--and binds it to `f`.  Inside the lambda, it references the list of words which is bound to `f`, but the list is not remade, no matter how many times the lambda is called.