Skip to content

Instantly share code, notes, and snippets.

@windmaomao
Created September 19, 2020 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save windmaomao/dcd461ff2da92645875c058b0735f15d to your computer and use it in GitHub Desktop.
Save windmaomao/dcd461ff2da92645875c058b0735f15d to your computer and use it in GitHub Desktop.
// aoc-2015-day2.kt
typealias Box = List<Int>
fun extractBox(s: String): Box = "\\d+".toRegex()
.findAll(s)
.map { it.value.toInt() }
.toList()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment