3 ms·
> Also Java lambdas can't change outer variables, so one have to resort to old tricks with one-item arrays. On the rare occasion that I need to do this, I usua
by kelnos 6y ago
> Also Java lambdas can't change outer variables, so one have to resort to old tricks with one-item arrays.
On the rare occasion that I need to do this, I usually find that I'm thinking about the problem the wrong way and there's a much clearer way to write it than messing with mutable variables outside my closures.
- fomine3 6y agoTend to so but it depends on situation.