If you want to pass setter and getter methods.
private fun setData(setValue: (Int) -> Unit, getValue: () -> (Int)) {
val oldValue = getValue()
val newValue = oldValue * 2
setValue(newValue)
}
Usage:
private var width: Int = 1
setData({ width = it }, { width })