code: @SuppressWarnings("unchecked")
      public static <FRAMETYPE extends WindupVertexFrame> FRAMETYPE getCurrentPayload(Variables stack, String name)
                  throws IllegalStateException, IllegalArgumentException
      {
          Map<String, Iterable<? extends WindupVertexFrame>> vars = stack.peek();
  
          Iterable<? extends WindupVertexFrame> existingValue = vars.get(name);
          if (!(existingValue == null || existingValue instanceof IterationPayload))
          {
              throw new IllegalArgumentException("Variable \"" + name
                          + "\" is not an " + Iteration.class.getSimpleName() + " variable.");
          }
  
          Object object = stack.findSingletonVariable(name);
          return (FRAMETYPE) object;
      }
docs: Get the {@link Iteration} payload with the given name.
  
  @throws IllegalArgumentException if the given variable refers to a non-payload.