79554423

Date: 2025-04-04 03:53:33
Score: 0.5
Natty:
Report link

I just want to get the last element from the list of models

Can't you use last function instead? The removeLast modifies the original list.

modelInstance = modelInstance.apply {
  if(isEmpty()){
    this += modelLoader.createInstancedModel(model, 10)
  }
}.last()
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
Posted by: jokuskay