Wesley Acheson
11/13/2020, 10:09 AMprivate fun toTree(inputRecords: List<MerchantRecord>) {
val byMerchant: (MerchantRecord) -> String? = { it.merchantName }
val byAccount: (MerchantRecord) -> String? = { it.accountName }
val groupings = listOf({ it.masterMerchantName }, { it.portfolio }, byMerchant, byAccount)
toTree(inputRecords, groupings)
}
And In intellij I can refactor inline. ByAccount or byMerchant
however as soon as I refactor the last entry it complains.