3 ms·
There is a bug in a code listing in the article: val exclaimed = strings.map { it + "!" } Should be val exclaimed = plain.map { it + "!" }
by mark_l_watson 8y ago
There is a bug in a code listing in the article:
val exclaimed = strings.map { it + "!" }
Should be
val exclaimed = plain.map { it + "!" }
- cpt1138 8y agoI’m glad you confirmed this. I don’t know much about Go but I do know programming. My gut told me there was a mistake but imposter syndrome kicked in and I assumed Go had some non-intuitive proximity rules like ‘it’ refers to the last iterable in scope or something. I have mentioned this before but the reason I like Java so much is the mature and cohesive ecosystem. Every single problem has been solved in Java and all the solutions look similar so you can readily pick them up. I don’t find that to be the case in other languages.