Skip to content

Instantly share code, notes, and snippets.

View pakerfeldt's full-sized avatar
🏠
Working from home

Patrik Åkerfeldt pakerfeldt

🏠
Working from home
View GitHub Profile
@pakerfeldt
pakerfeldt / day1a.scala
Last active December 7, 2017 09:38
AoC 2017 day 1
List(91212129)
.map(_.toString)
.flatMap(x => x.toList :+ x.charAt(0))
.sliding(2)
.filter { case first :: second :: _ => first == second}
.foldLeft(0){ case (acc, value :: _) => acc + value.asDigit}
Not a registered hatt

Keybase proof

I hereby claim:

  • I am pakerfeldt on github.
  • I am pakerfeldt (https://keybase.io/pakerfeldt) on keybase.
  • I have a public key whose fingerprint is 0845 C363 B788 3EFC DF73 0310 AA84 13D6 F8D2 F31E

To claim this, I am signing this object: