https://kotlinlang.org logo
#advent-of-code
Title
# advent-of-code
k

karelpeeters

12/17/2018, 7:41 PM
Maybe there's a better way, I hate the literal code duplication there.
p

Pavlo Liapota

12/17/2018, 7:43 PM
I have one local function to which I pass
Int::inc
or
Int::dec
to go right or left 🙂
k

karelpeeters

12/17/2018, 7:45 PM
Good idea, I'll give that a shot to see if I like it better.
p

Pavlo Liapota

12/17/2018, 7:46 PM
But I had same two loops and made it nicer only after solving the challenge 😆
j

Joris PZ

12/17/2018, 8:02 PM
@Pavlo Liapota I am totally stealing your code 🙂
🙂 1
5 Views