Scala Language Extractors

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • val extractor(extractedValue1, _ /* ignored second extracted value */) = valueToBeExtracted
  • valueToBeExtracted match { case extractor(extractedValue1, _) => ???}
  • val (tuple1, tuple2, tuple3) = tupleWith3Elements
  • object Foo { def unapply(foo: Foo): Option[String] = Some(foo.x); }


Got any Scala Language Question?