Skip to content

Commit 7315a63

Browse files
author
mdodsworth
committed
more concise version of upper
1 parent 4f2fe38 commit 7315a63

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Upper.scala

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
class Upper {
1+
object Upper {
2+
def upper(strings: String*) = strings.map(_.toUpperCase)
3+
}
4+
5+
println(Upper.upper("a", "scala", "test", "from"))
26

0 commit comments

Comments
 (0)