User avatar
Ben Cohen @airspeedswift@mastodon.social
2y
Advent of Code spoilers I'm sure there are better ways to do it but I found this solution pleasingly disgusting.
1
0
0
0
User avatar
Ben Cohen @airspeedswift@mastodon.social
2y
Advent of Code spoilers and for the code golf enthusiasts, part 1 in one line (no semicolons allowed)

print(sequence(state:0){_ in readLine()}.reduce(0){$0+{$0[0]*10+$0.last!}($1.compactMap(\.wholeNumberValue))})
2
0
0
0
User avatar
namori @namori@peculiar.florist
2y
re: Advent of Code spoilers @airspeedswift very short, but really disgusting, I hesitate between loving or burning it ​:blobcat_just_right:​
0
0
0
0