Misc. experiments in groovy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
141 B

count = [:]
count.test = 1
count.is = 2
['this', 'is', 'a', 'test'].each {
count[it] ? (count[it] += 1) : (count[it] = 1)
}
println count