Address feedback from @macbre
Use anonymous function in-place