tuned;
authorwenzelm
Tue, 02 Jul 2024 21:35:40 +0200
changeset 80477 d32748570069
parent 80476 59e088605d49
child 80478 902e6da44a68
tuned;
src/Pure/General/word.scala
--- a/src/Pure/General/word.scala	Tue Jul 02 17:38:28 2024 +0200
+++ b/src/Pure/General/word.scala	Tue Jul 02 21:35:40 2024 +0200
@@ -66,7 +66,9 @@
   def implode(words: Iterable[String]): String = words.iterator.mkString(" ")
 
   def explode(sep: Char => Boolean, text: String): List[String] =
-    Library.separated_chunks(sep, text).map(_.toString).filter(_ != "").toList
+    List.from(
+      for (s <- Library.separated_chunks(sep, text) if !s.isEmpty)
+        yield s.toString)
 
   def explode(sep: Char, text: String): List[String] =
     explode(_ == sep, text)