Strikingly similar to some of Adam's VB.NET code, but clocks in at a heavy 160 chars not counting function declaration. I'll never be a VB.NET coder, but I may start rethinking my preconceived notions about VB.NET wordiness, considering I came up with the same solution you did, and yours is smaller.
Edit: looking again, it's pretty much identical to Adam's first entry, but I swear I didn't cheat
In VB.net you can drop the braces around empty method parameters, which helps a lot. As well as the lack of having to include return in the Yield statement. It's a shame that Yield isn't an expression, so you could do a yield and pass the value into an assignment / expression.
Well, a quick question - why not create a separate forum for challenges? I mean, it is difficult enough to monitor challenges in C/C++/C# forum, and now I see challenges are being posted here. Just how many forums must a man see for a decent challenge? All in favor, say so. All those not in favor, go to hell.
You can bring it up in the Site Feedback forum, but it won't happen. We usually have language-specific challenges. Sometimes the creators will allow for people to enter code from other languages, and sometimes others will do it even if not asked, but the challenge should be made in the language forum that it's originally intended for.
Mods don't have that ability. I'm not even sure the admins can add another forum. I believe that only Chris can do that. However, even if I could, I don't agree with your suggestion, as I noted in my previous post. Just because the challenge accepts other languages doesn't mean that it doesn't start as a challenge in a particular language. However, if the challenge is good, it should be featured on the front page, so check there every so often.
Technically this is a Python challenge, but I learned from my earlier challenges that making it open language yields a much better response. Also, these sorts of challenges can help spread Python's popularity by highlighting some of its strengths. In this case, the simplicity of its syntax can yield very small code
CASE AND POINT: AdamSpeight2008 saw other people's Python code and got a great idea of his own and installed Python to test it.
This post has been edited by atraub: 04 October 2012 - 07:19 AM