Split list when predicate is true
问题 Does Kotlin provide a mutation function to split a list when a specific predicate is true? In the following example the list should be split when the element is a . . The result should be of the type List<List<String>> . // input list val list = listOf( "This is", "the", "first sentence", ".", "And", "now there is", "a second", "one", ".", "Nice", "." ) // the following should be the result of the transformation listOf( listOf("This is", "the", "first sentence"), listOf("And", "now there is",