Links e as first element.
502936
private void linkFirst(E e) {
        final Node<E> f = first;
        final Node<E> newNode = new Node<>(null, e, f);
        first = newNode;
        if (f == null)
            last = newNode;
        else
            f.prev = newNode;
        size++;
        modCount++;
    }
302242
public static void replaceOrAppend(Element e, Widget widget) {
    assert e != null && widget != null;
    if ($(e).widget() != null && $(e).widget().isAttached()) {
      replaceWidget($(e).widget(), widget, true);
    } else {
      detachWidget(widget);
      replaceOrAppend(e, widget.getElement());
      attachWidget(widget, getFirstParentWidget(widget));
    }
  }
966660
function (el, links) {
            $el = $(el);
            this.createLinks(links);
            if (!browser.ie) {
                // @NOTE: event handlers are individually bound in IE, because
                // the ctrl+click workaround fails when using event delegation
                $el.on('click', '.' + CSS_CLASS_PAGE_LINK, handleClick);
            }
        }
339361
def _element_append_path(
        start_element,  # type: ET.Element
        element_names  # type: Iterable[Text]
):
    # type: (...) -> ET.Element
    
    end_element = start_element
    for element_name in element_names:
        new_element = ET.Element(element_name)
        end_element.append(new_element)
        end_element = new_element

    return end_element
628592
public static <E> E first(Iterable<E> iterable) {
        dbc.precondition(iterable != null, "cannot call first with a null iterable");
        return new FirstElement<E>().apply(iterable.iterator());
    }
238635
def element(self, name, attrs=None):
    """"""
    self.open(name, attrs)
    yield
    self.close()
74206
private void generateBackLinks(final Metadata m, final Element e) {
        final Element backLinksElements = new Element("backLinks", NS);
        for (final URL backLink : m.getBackLinks()) {
            addNotNullElement(backLinksElements, "backLink", backLink);
        }
        if (!backLinksElements.getChildren().isEmpty()) {
            e.addContent(backLinksElements);
        }
    }
803414
def add_element(self, e):
        
        """
        if not isinstance(e, Iterable):
            raise TypeError("given element {} is not iterable in terms of "
                            "PyEMMAs coordinate pipeline.".format(e))

        # only if we have more than one element
        if not e.is_reader and len(self._chain) >= 1:
            data_producer = self._chain[-1]
            # avoid calling the setter of StreamingTransformer.data_producer, since this
            # triggers a re-parametrization even on readers (where it makes not sense)
            e._data_producer = data_producer
        e.chunksize = self.chunksize
        self._chain.append(e)
1283636
private boolean linkFirst(Node<E> node) {
        // assert lock.isHeldByCurrentThread();
        if (count >= capacity)
            return false;
        Node<E> f = first;
        node.next = f;
        first = node;
        if (last == null)
            last = node;
        else
            f.prev = node;
        ++count;
        notEmpty.signal();
        return true;
    }
835533
function link(scope, elem, attrs) {
      var componentId = attrs.mdComponentId || 'mainMenu';
      var mainContentArea = $document[0].querySelector(attrs.mainContent || 'main');

      $rootScope.$on('$locationChangeSuccess', openPage);

      /**
       * @ngdoc function
       * @name openPage
       * @methodOf mainMenu.directive:
       * @description
       * Open a page
       */
      function openPage() {
        $mdSidenav(componentId)
          .close()
          .then(mainContentArea.focus());
      }
    }
703979
void linkBefore(E e, Node<E> succ) {
        // assert succ != null;
        final Node<E> pred = succ.prev;
        final Node<E> newNode = new Node<>(pred, e, succ);
        succ.prev = newNode;
        if (pred == null)
            first = newNode;
        else
            pred.next = newNode;
        size++;
        modCount++;
    }
919916
function link(mode, target, system, containerDef, container, out, cb) {
    logger.info('linking');
    out.stdout('linking');

    var elb = findParentELB(system, container);

    if (elb) {
      logger.info(elb, 'elb found');
      linkToELB(mode, system, elb, container, out, cb);
    } else {
      logger.info('elb not found');
      cb(null, system);
    }
  }
1194109
public E union(E e1, E e2) {
	Node<E> node1 = _get_or_create_root_set(e1);
	Node<E> node2 = _get_or_create_root_set(e2);
	return _link(node1, node2).element;
    }
1115892
function(e) {
            var $this = $(this).closest('.context-menu-item'),
                data = $this.data(),
                opt = data.contextMenu,
                root = data.contextMenuRoot;

            root.$selected = opt.$selected = $this;
            root.isInput = opt.isInput = true;
        }
111462
public void addFirst(E e) {
        if (e == null)
            throw new NullPointerException();
        elements[head = (head - 1) & (elements.length - 1)] = e;
        if (head == tail)
            doubleCapacity();
    }
1209899
private Node linkFirst(E e) {
        final Node<E> newNode = newNode(Objects.requireNonNull(e));

        restartFromHead:
        for (;;)
            for (Node<E> h = head, p = h, q;;) {
                if ((q = p.prev) != null &&
                    (q = (p = q).prev) != null)
                    // Check for head updates every other hop.
                    // If p == q, we are sure to follow head instead.
                    p = (h != (h = head)) ? h : q;
                else if (p.next == p) // PREV_TERMINATOR
                    continue restartFromHead;
                else {
                    // p is first node
                    NEXT.set(newNode, p); // CAS piggyback
                    if (PREV.compareAndSet(p, null, newNode)) {
                        // Successful CAS is the linearization point
                        // for e to become an element of this deque,
                        // and for newNode to become "live".
                        if (p != h) // hop two nodes at a time; failure is OK
                            HEAD.weakCompareAndSet(this, h, newNode);
                        return newNode;
                    }
                    // Lost CAS race to another thread; re-read prev
                }
            }
    }
1362977
private void move1() {
        if (node == null)
            return;

        if (position >= reference.size()) {
            node = null;
            return;
        }

        node = node.links[reference.codeAt(position++)];
    }