FunProg-Scala/src/Assignment1/FirstSteps.sc
2025-02-21 15:24:53 +01:00

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