i guess actually declaring a data class is one lin...
# announcements
g
i guess actually declaring a data class is one line of code, and then converting that data class is another 1 line function, so i can just create a new wrapper:
Copy code
data class MutableInsets(var left: Double, var right: Double, var top: Double, var bottom: Double){
  fun toInsets() = Insets(left, right, top, bottom)
}

fun myFunction(node: Node, mutator: MutableInsets.() -> Unit) {
  val mutable = initialInsets.let { MutableInsets(it.left, it.right, it.top, it.bottom); }
  mutator(mutable);
  return mutable.toInsets();
}