code: public static MatrixFunction asModFunction(final double arg) {
          return new MatrixFunction() {
              @Override
              public double evaluate(int i, int j, double value) {
                  return value % arg;
              }
          };
      }
docs: Creates a mod function that calculates the modulus of it's argument and given {@code value}.
  
  @param arg a divisor value
  
  @return a closure that does {@code _ % _}