Any idiomatic kotlin function for below snippet?

val inps = listOf( "pale" to "ple", "pales" to "pale", "pale" to "bale", "pale" to "bake", "" to "asb", "" to "a" ) listOf(::solve1, ::solve2) .flatMap { func -> inps.map { (str1, str2) -> Triple(func, str1, str2) } } .forEach { (solve, str1, str2) -> println("${solve.name}, $str1/$str2 = ${solve(str1, str2)}") } 

submitted by /u/dragneelfps
[link] [comments]