Created
April 28, 2021 13:25
-
-
Save deanwampler/69c632b80645180d406f3f4945890443 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted from the Programming Scala, Third Edition code examples | |
// https://github.com/deanwampler/programming-scala-book-code-examples | |
// src/script/scala/progscala3/patternmatching/Matchable.scala | |
val iarray = IArray(1,2,3,4,5) | |
iarray match | |
case a: Array[Int] => a(2) = 300 // Scala 3 warning!! | |
println(iarray) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment