code: public static MutableLongTuple inclusiveScan(
          LongTuple t0, LongBinaryOperator op, MutableLongTuple result)
      {
          result = LongTuples.validate(t0, result);
          int n = t0.getSize();
          if (n > 0)
          {
              result.set(0, t0.get(0));
              for (int i=1; i<n; i++)
              {
                  long operand0 = result.get(i-1);
                  long operand1 = t0.get(i);
                  long r = op.applyAsLong(operand0, operand1);
                  result.set(i, r);
              }
          }
          return result;
      }
docs: Performs an inclusive scan on the elements of the given tuple, using
  the provided associative accumulation function, and returns the
  result.<br>
  <br>
  If the given <code>result</code> tuple is <code>null</code>, then a
  new tuple will be created and returned.<br>
  <br>
  The <code>result</code> tuple may be identical to the input tuple.
  
  @param t0 The tuple
  @param op The accumulation function
  @param result The result
  @return The result
  @throws IllegalArgumentException If the given result tuple is not
  <code>null</code> and has a different {@link Tuple#getSize() size}
  than the input tuple