13 lines
184 B
Scala
13 lines
184 B
Scala
def sqr(x: Double): Double = x * x
|
|
def pow4(x: Double): Double = sqr(x) * sqr(x)
|
|
|
|
sqr(3)
|
|
sqr(7)
|
|
sqr(0.5)
|
|
sqr(-2)
|
|
|
|
pow4(2)
|
|
pow4(10)
|
|
|
|
// def bar(x: Int, y: Boolean) = "Hello"
|
|
// A String |