pike.git / lib / modules / Array.pmod

version» Context lines:

pike.git/lib/modules/Array.pmod:552:    {    mixed mem=`+(@a[..999]);    int j=1000;    array v;    while (sizeof(v=a[j..j+999]))    mem=`+(mem,@v),j+=1000;    return mem;    }   }    - //! @decl array uniq(array a) - //! Perform uniq on an array: - //! aabbbcaababb -> abc -  +    //! Perform the same action as the Unix uniq command on an array,   //! that is, fold consecutive occurrences of the same element into   //! a single element of the result array:   //!   //! aabbbcaababb -> abcabab.   //!   //! See also the @[uniq] function.   array uniq2(array a)   {    array res;