Didn’t expect this one. What do you think is the result?

listOf(1,2,3).foldRightIndexed(0) {index, i, acc -> index * i + acc } 

I would somehow hope to get a warning from IntelliJ about unary operator behavior here.

submitted by /u/Xainium
[link] [comments]