On Thu, May 2, 2013 at 7:25 AM, Sasha Pachev <[email protected]> wrote:
> Levi, beat this in Haskell. Barry, Dale, beat this in Java.

Sorry, you'll have to find someone with more time on their hands and
who actually cares how fast Java can read, reverse, and print lines of
text.

But I can tell you I would much rather write:

#!/usr/bin/perl

while ($curr_line = <STDIN>) {
    print scalar reverse($currr_line);
}

I haven't run that, but I'm pretty sure it will work and that was just
off the top of my head in 2 minutes. I'm no perl expert, but I do try
to use the right tool for the job.

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to