Type instability when using map with closures

You can also read The Great Debate if you want to get into the weeds!