code: public List<SnippetEvent> drop(Snippet snippet) throws IllegalStateException {
          checkIfAlive();
          checkValidSnippet(snippet);
          List<SnippetEvent> events = eval.drop(snippet);
          events.forEach(this::notifyKeyStatusEvent);
          return Collections.unmodifiableList(events);
      }
docs: Remove a declaration from the state.  That is, if the snippet is an
  {@linkplain jdk.jshell.Snippet.Status#isActive() active}
  {@linkplain jdk.jshell.PersistentSnippet persistent} snippet, remove the
  snippet and update the JShell evaluation state accordingly.
  For all active snippets, change the {@linkplain #status status} to
  {@link jdk.jshell.Snippet.Status#DROPPED DROPPED}.
  @param snippet The snippet to remove
  @return The list of events from updating declarations dependent on the
  dropped snippet.
  @throws IllegalStateException if this {@code JShell} instance is closed.
  @throws IllegalArgumentException if the snippet is not associated with
  this {@code JShell} instance.