Join Slack
Powered by
What would the idiomatic Kotlin-equivalent for <ht...
# getting-started
r
rocketraman
06/22/2016, 7:48 PM
What would the idiomatic Kotlin-equivalent for
http://stackoverflow.com/questions/5852722/replace-individual-list-elements-in-haskell
be?
Copy code
list.mapIndexed { i, v -> if(i == indexToUpdate) { updatedVAtIndex } else v }
Open in Slack
Previous
Next