Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I got it too, the same code for 5 languages I've never heard about, one after another. I felt ignorant, until it told me it's also valid racket :).

    int main(){
       for(int i = 99; i > 0; i--){
          write(i + " bottles of beer on the wall, " + i + " bottles of beer.\n");
          write("Take one down and pass it around, " + (i-1) + " bottles of beer on the wall.\n\n");
        }
        write("No more bottles of beer on the wall, no more bottles of beer.\n");
        write("Go to the store and buy some more, 99 bottles of beer on the wall.\n");
    }


lol, but Racket being so DSL friendly I would have doubted myself.

My 5 bugged languages were : scala, groovy, Dart, they're all not too unrelated.


Well, if you

    #define write(x) {};
it's even valid C :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: