Map.values returns an
Iterable and the
toSeq comes from
TraversableOnce, which in turn calls
toStream when you call
This is a problem with the Seq abstraction or the Stream abstraction. However you want to look at it. List and Stream both implement Seq, but have different behaviour for certain operations. Imagine having an infinite Stream and you call .tail on it. it would never return.
I tend to not use Seq anymore, but use List everywhere. And Stream explicitly where I want Stream behaviour.
- Getting strange behaviour converting a Seq to a String in my message handler
- Seq sortWith function with strange behaviour
- Scala foreach strange behaviour
- Scala safe way of converting String to Enumeration value
- Getting object instance by string name in scala
- Converting JSON string to a JSON object in Scala
- Getting the string representation of a type at runtime in Scala
- Converting JsValue to String
- Strange pattern matching behaviour with AnyRef
- Strange behaviour of the Array type with `==` operator
- Converting empty string to a None in Scala
- Strange GC behaviour of Scala actors application
- String split behaviour on empty string and on single delimiter string
- Unexpected behaviour of iterator on String
- How to make Reflection for getting the field value by its string name and its original type
- Strange bug with string interpolation
- Mixing typed matches with sequence matcher gives out strange behaviour in Scala
- Trimming byte array when converting byte array to string in Java/Scala
- converting xml to Json with lift behaves strange
- Converting Case Classes with params as Case Classes to Avro Message to send to Kafka
- Strange implicit resolution behaviour with type classes and package objects
- Scala Converting multiline string to BigInt
- Strange behaviour
- Converting Iterator[String] to String
- Converting a String to a Map
- Strange error message on scala 2.10 / sbt 0.13 upgrade
- Strange behaviour with mouse click and hover on javafx2
- Converting string "decimal" to DecimalType
- Getting TypeTag from a classname string
More Query from same tag
- What do the result dataframe's columns of a Deequ check signify?
- SBT: How to use `fastOptJS::webpack` in `build.sbt`?
- Scala pattern match on classes with a typed parameter
- Partitioning in Spark
- Scala Set: + vs. ++
- How to do custom partition in spark dataframe with saveAsTextFile
- The i/p col features must be either string or numeric type, but got org.apache.spark.ml.linalg.VectorUDT
- Scala: Spec2 Dependencies
- How to prevent empty list errors in in clause in sql?
- What exactly does this snippet do in scala?
- too many map keys causing out of memory exception in spark
- Adding java classes to sbt assembly
- How can you view the result of RDD.join() in Scala?
- Spark: how to filter rows without using any joins?
- Scala Slick update
- Does spark.sql.functions.typedLit supports Map[String, Any]
- Akka Ask Pattern with many types of responses
- How to execute a command from a scala script?
- How can it be possible? duplicate records in Kafka queue?
- Processing multiple files as independent RDD's in parallel
- Play2-Auth vs SecureSocial vs Deadbolt2
- Scala in intellij cannot find my function definition?
- How to generate HTML reports on Play ScalaTest
- How to list the path of files inside Hdfs directory and subdirectory?
- How to flatten a list of lists when the root type is List[Any]
- Type mismatch, expected: DBIOAction[NotInferedR, NoStream, Nothing], actual: Future[PortalPostgresProfile.ProfileAction[Int, NoStream, Effect.Write]]
- Scala Update first element of collection
- Polymorphic Methods in Scala- why is this allowed?
- Why is Scala slow to initialize an Array of tuples?
- Creating arbitary Higher Kinded Types in Scala