concept structure in category scala

appears as: structures, structure, The structure, structure
Get Programming with Scala

This is an excerpt from Manning's book Get Programming with Scala.

A functional approach can be more readable and reusable, but not as performant. Thanks to immutable data and structures, you can guarantee the correctness of your program when dealing with concurrency: your data never changes, so it is safe to share it. Your code will also be easier to understand and reuse because all its components will be independent of external factors outside of its control. But recreating data rather than updating can be an expensive operation, although it has massively improved thanks to numerous memory optimizations and efficient garbage collection strategies in recent years.

Figure 22.2: Visual summary of the structure of the Scala’s Option type. An Option[A] is either a Some[A] of a value a or None, which is the representation for its absence.
Listing 38.2: The structure of Either
sealed abstract class Either[A, B]
 
case class Left[A, B](value: A) extends Either[A, B]
 
case class Right[A, B](value: B) extends Either[A, B]