code: public R scan(Iterable<? extends Tree> nodes, P p) {
          R r = null;
          if (nodes != null) {
              boolean first = true;
              for (Tree node : nodes) {
                  r = (first ? scan(node, p) : scanAndReduce(node, p, r));
                  first = false;
              }
          }
          return r;
      }
docs: Scans a sequence of nodes.
  @param nodes the nodes to be scanned
  @param p a parameter value to be passed to the visit method for each node
  @return the combined return value from the visit methods.
  The values are combined using the {@link #reduce reduce} method.