public <R> R invokeWithTop(Function<T, R> callback) {
		ListWithView<T> s = stack.get();
		return s.isEmpty() ? callback.apply(null) : callback.apply(s.get(0));
	}
Run the given callback with the topmost value, returning its value

<p>
This works like {@link #invokeWithTop(Consumer)}, except that the callback can return a
value. Note that a fallback parameter is not taken, since the callback is always invoked. The
callback should implement its own fallback logic.

@param <R> the return type
@param callback the callback
@return the value from the callback
Ghidra/Debug/ProposedUtils/src/main/java/utilities/util/SuppressableCallback.java