Skip to content

Instantly share code, notes, and snippets.

@nagat01
Last active September 4, 2024 01:13
Show Gist options
  • Save nagat01/8c1a0354edae3c4a61d3b9b72e0defd4 to your computer and use it in GitHub Desktop.
Save nagat01/8c1a0354edae3c4a61d3b9b72e0defd4 to your computer and use it in GitHub Desktop.
object A:
def unapplySeq(x: String) = Some(x.toSeq)
@main def main = println:
"Scala" match
case A(a, b, _*) => s"$a, $b"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment