Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
val pattern = "([0-9]+) ([A-Za-z]+)".r
val pattern(count, fruit) = "100 Bananas"
println(count)
println(fruit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment