Peter Haworth wrote: > > On 3 Dec 2003 20:00:37 -0000, Mtv Europe wrote: > > A new golf "Entropy compress" is at http://terje2.perlgolf.org/ > > > If it is not the first occurrence, the word is not copied to the > > compressed file. Instead, its position in the list is copied into the > > compressed file and the word is moved to the front of the list. > > Which word is moved? Does this mean that the word in the list is moved *from > its original position*, or that the word is *added again* to the beginning > of the list? I can't get the expected results using either method (though > some of the numbers are correct), so either I've coded it wrong (entirely > possible), or I've missed another possible interpretation (equally likely).
After its current position in "the list" is output to the compressed file, the word is moved *from its original position* to the beginning of the list. Each word is in the list only once. -- Rick Klement