Summing up

Report a typo

What would be the result of the expression below?

val list = 
  for
    i <- List(0, 1, 2, 3, 4, 5, 6, 7)
  yield 1 << i

println(list.sum)
Enter a number
___

Create a free account to access the full topic