Home / CSE MCQs / Scala-1 :: Discussion

Discussion :: Scala-1

  1. How should we end a stream to calculate sum of elements?
  2. A.
    Sink.sum_
    B.
    Sink.fold[Int, Int](0)(_ + _)
    C.
    Sink.sum[Int](_)
    D.
    Sink.map(_ + _)

    View Answer

    Workspace

    Answer : Option B

    Explanation :



Be The First To Comment