karelpeeters
08/19/2019, 6:27 AMBooleanArray(64) { (long shr it) and 1 != 0 }LastExceed
08/19/2019, 6:28 AMkarelpeeters
08/19/2019, 6:31 AMkarelpeeters
08/19/2019, 6:32 AMBitSet from Java, it can convert back and forth to a long array.karelpeeters
08/19/2019, 6:36 AMarr.foldIndexed(0L) { i, a, b -> a + if (b) 1 shr i else 0 }LastExceed
08/19/2019, 6:37 AMkarelpeeters
08/19/2019, 6:38 AMfold, it applies the lambda repeatedly to the previous result and the next element of the array. It's a common functional idiom, I'm sure there's lots of information about this online.LastExceed
08/19/2019, 6:39 AMkarelpeeters
08/19/2019, 6:39 AMsumByLong which is missing from the stdlib I think.LastExceed
08/19/2019, 6:55 AMkarelpeeters
08/19/2019, 6:56 AMshl.LastExceed
08/19/2019, 6:56 AMDico
08/19/2019, 10:30 AMLastExceed
08/19/2019, 10:31 AMLong valuesLastExceed
08/19/2019, 2:05 PM