I\'m going through a phase of trying to avoid temporary variables and over-use of conditional where I can use a more fluid style of coding. I\'ve taken a great liking to us
I needed to do something like this and I like tokland's answer, but I didn't want to pollute Object for the small script I was writing. Instead, I made use of tap on an array: