refactoring to avoid creating closures
refactoring to avoid creating closures

Reviewed By: mroch

Differential Revision: D13910438

fbshipit-source-id: cee1329611de6d9d9e26cf6b3bc24aefb89710b1

facebook/flow,mroch/flow,mroch/flow,gabelevi/flow,facebook/flow,samwgoldman/flow,popham/flow,gabelevi/flow,samwgoldman/flow,popham/flow,mroch/flow,popham/flow,samwgoldman/flow,gabelevi/flow,facebook/flow,popham/flow,popham/flow,facebook/flow,samwgoldman/flow,samwgoldman/flow,mroch/flow,facebook/flow,gabelevi/flow,gabelevi/flow,mroch/flow,popham/flow,gabelevi/flow,facebook/flow,samwgoldman/flow,mroch/flow,facebook/flow,mroch/flow,gabelevi/flow,popham/flow,samwgoldman/flow