Scala Constructs
Scala Constructs
function getMeTimeAdded(arg
Integer) = currentTime + Integer no
Which of the following are the key concepts of Functional Programming a. Immutability b. Pure functions
c. Inheritance d. Referential Transparency .a,b,d
For the given statement, val s = List(1,2,3) What would be the type of s?List[Int]
val s = List(1,2,3,4)
val t = List(5,6,7,8)
val n = s ++ t
println(n) List(1, 2, 3, 4, 5, 6, 7, 8)
What would be the type inferred by Scala compiler for variable salary. val salary = 3000.00 Float
Consider the following code snippet (a: Int) => a*a. Above code snippet is an example of higher order
function