-2
Ich habe die folgende Liste:Splitting eine Liste in mehrere Listen
List("Chapter 1", "2", "This is a sentence", "English")
ich möchte es wie folgt aufgeteilt:
List("Chapter 1", "2", "This", "English")
List("Chapter 1", "2", "is", "English")
List("Chapter 1", "2", "a", "English")
List("Chapter 1", "2", "sentence", "English")
Seien Sie vorsichtig, da 'List # apply', dh 'Liste (2) === Liste # gilt (2)', ist keine Gesamtfunktion. 'scala> List(). apply (2) -> java.lang.IndexOutOfBoundsException: 2' –
Kevin, kannst du bitte näher ausführen? –