bod
03/10/2018, 10:32 PMval resolutions = mutableListOf<Source>()
for (apiSource in apiModel.resolutions) {
resolutions += ApiSourceConverter.convert(apiSource)
}
which could be easily refactored using map { }
, and I’m pretty sure I’ve seen in the past that AS automatically suggested it. I’m currently using IntelliJ Idea and there’s no suggestion. Have I dreamed, or is this a bug, or is this an AS only feature? Thanks!Shawn
03/10/2018, 10:34 PMbod
03/10/2018, 10:35 PMShawn
03/10/2018, 10:36 PMShawn
03/10/2018, 10:37 PMalt+enter
with the caret on the for-loopbod
03/10/2018, 10:38 PMShawn
03/10/2018, 10:39 PMhttps://i.imgur.com/6t0pSjt.png▾
bod
03/10/2018, 10:40 PMShawn
03/10/2018, 10:41 PMShawn
03/10/2018, 10:43 PMShawn
03/10/2018, 10:43 PM+=
rather than .add(E)
?bod
03/10/2018, 10:43 PMadd
and still don’t have the intentionShawn
03/10/2018, 10:44 PMbod
03/10/2018, 10:44 PMbod
03/10/2018, 10:44 PMShawn
03/10/2018, 10:44 PMbod
03/10/2018, 10:45 PMbod
03/10/2018, 10:45 PMShawn
03/10/2018, 10:45 PMShawn
03/10/2018, 10:45 PMbod
03/10/2018, 10:46 PMbod
03/10/2018, 10:46 PMbod
03/10/2018, 10:50 PM