``` val result: Map<String, List<String>&...
# arrow
r
Copy code
val result: Map<String, List<String>> = listOf("one", "two", "three").groupBy { 
  if (it.contains("n")) "nCount"
  else if (it.contains("x")) "xCount"
  else "others"
}
t
this one works in essence for the contrived example. But I kind of think that this is essentially merging the fold functions by hand. Also if a fold produced a different type than the others, I think this would no longer work