Skip to content

Instantly share code, notes, and snippets.

@etheleon
Created May 4, 2021 23:39
Show Gist options
  • Save etheleon/2616b10ab7ccd08584af3d16e3165811 to your computer and use it in GitHub Desktop.
Save etheleon/2616b10ab7ccd08584af3d16e3165811 to your computer and use it in GitHub Desktop.
scala-101

Class

class Upper {
  def upper(strings: String*): Seq[String] = {
    strings.map((s:String) => s.toupperCase())
  }
}

String* Sequence of 0 or more elements

scala's Seq is equivalent to Java's List. And Seq is a trait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment