I'm new to Scala. I have a function:
def fromBinaryListBig(in: Array[Int]): BigInt = {
var sum = 0
in foreach (x => {sum <<= 1; sum += (x&1)})
sum
}
Is it possible to make the return type generic (integer types, Long, Int)? Thanks in advance ...