pike.git / lib / modules / Array.pmod

version» Context lines:

pike.git/lib/modules/Array.pmod:49:   mixed rreduce(function fun, array arr, mixed|void zero)   {    if(sizeof(arr))    zero = arr[-1];    for(int i=sizeof(arr)-2; i>=0; --i)    zero = ([function(mixed,mixed:mixed)]fun)(arr[i], zero);    return zero;   }      //! @[shuffle()] gives back the same elements, but in random order. + //! The array is modified destructively.   //!   //! @seealso   //! @[permute()]   //!   array shuffle(array arr)   {    int i = sizeof(arr);       while(i) {    int j = predef::random(i--);