lint doesn't like this anon function living inside a loop. Let's declare it in a named function before the for loop and pass it in as a callback.