Comment by gazrogers
15 years ago
There's a few short implementations of this algorithm on CodeGolf.SE: http://codegolf.stackexchange.com/questions/2722/implement-s...
15 years ago
There's a few short implementations of this algorithm on CodeGolf.SE: http://codegolf.stackexchange.com/questions/2722/implement-s...
I'm relieved to note that Haskell and Erlang don't have to be ridiculously verbose. There's even an Erlang one-liner that is competitive with the Perl and Ruby implementations for brevity. I was amused to note that Perl is still the shortest implementation, and could be shorter (though the frighteningly short Perl 6 implementation mentioned in the 4chan thread is either wrong, or the implementation of the <<. operator is still unfinished in Rakudo Star, because it does not actually do the job; I don't understand the hyperoperators well enough yet to know which is true).