karelpeeters
12/10/2017, 1:26 PM.reduce(Int::xor)
to work, thanks!menegatti
12/10/2017, 1:26 PMmenegatti
12/10/2017, 1:27 PMmenegatti
12/10/2017, 1:28 PMchunked
... it just saved us from such a hasslekarelpeeters
12/10/2017, 1:28 PM.windowed(16, step = 16)
at first.karelpeeters
12/10/2017, 1:29 PMswap
existed already, but that was just the example on this page: https://kotlinlang.org/docs/reference/extensions.html#extension-functionsmenegatti
12/10/2017, 1:30 PMwindowed
but the step
felt unnecessary. good thing they thought about that specific use caseandyb
12/10/2017, 1:36 PMchunked
actually calls windowed
under the hood anywayandyb
12/10/2017, 1:37 PMkarelpeeters
12/10/2017, 1:37 PMwindowed(size, size, partialWindows = true)
yikes, you'd think partialwindows was false
by defaut.karelpeeters
12/10/2017, 1:38 PMfun Int.toHex() = "%02x".format(this)
? Isn't that taking it a bit too far 🙂?andyb
12/10/2017, 3:16 PMtodd.ginsberg
12/10/2017, 6:29 PMtodd.ginsberg
12/10/2017, 6:30 PMJan Vomlel
12/11/2017, 12:04 AMkarelpeeters
12/11/2017, 12:07 AMtodd.ginsberg
12/11/2017, 12:33 AMkarelpeeters
12/11/2017, 7:33 AMandyb
12/11/2017, 8:16 AMkarelpeeters
12/11/2017, 8:18 AMfold
, dammit.andyb
12/11/2017, 8:29 AMfold
but I tend to overuse it, e.g. yesterday when I used fold
rather than reduce
to apply the xor
karelpeeters
12/11/2017, 8:41 AMandyb
12/11/2017, 9:00 AMaccumulate
function which is a sort of hybrid between fold
& `map`so that you get a list of results by applying a operation to the previous result. So in the end I implemented it myself.andyb
12/11/2017, 9:02 AMmenegatti
12/11/2017, 9:49 AMandyb
12/11/2017, 9:50 AMmenegatti
12/11/2017, 9:51 AMmenegatti
12/11/2017, 9:52 AMmenegatti
12/11/2017, 9:53 AM