Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 538 Bytes

exercise1.md

File metadata and controls

30 lines (26 loc) · 538 Bytes
    1 + 1
    :type 1
    1.0 / 2
    :type 1.0
    "a" + "b"
    :t "a"
    "ab" * 3
    "a".+("b")
    "ab".*(3)
    "ab" + 'c'
    'ab' + "c"
    BigInt("12345679") * 9
    
    
    val a = 1
    var b = 2
    b = 3
    a = 4
    val c = 1 + 2; c + 3
    
    
    def size = 2
    5 * size
    def square(x: Int) = x * x
    square(2)
    square(square(2))
    def sumOfSquare(x: Int, y: Int) = square(x) + square(y)
    def abs(x: Int) = if (x >=0) x else -x