On type annotations

Yes, my point is that closures can lead to unexpected behavior, and depending on where you add the type annotation, you don’t necessarily solve the problem. I was just adding a word of caution about using type annotations as a silver bullet for type inference in closures. But, yeah, in the example I provided, the issue won’t arise.

1 Like