Core concept

extension (s: String)
  def capitalize2: String = s.head.toUpper + s.tail
Advertisement

How it works

Only in Scala 3. Migration needs.

Advertisement

Trade-offs + gotchas

Enriching types. DSL fluent APIs.