* @param heads  List of RelatedArguments
* @param tails out-argument, List of RelatedArguments
* @return List of arguments
481852
private static List<Argument> separate(List<RelatedArgument> heads, List<RelatedArgument> tails) {
        List<Argument> merge;

        merge = new ArrayList<Argument>();
        for (RelatedArgument head : heads) {
            merge.add(head.arg);
            tails.addAll(head.nexts);
        }
        return merge;
    }
553850
public static <Head, Tail extends HList> HCons<Head, Tail> cons(Head head, Tail tail) {
        return new HCons<>(head, tail);
    }
614718
public static void registerTinyTypes(Class<?> head, Class<?>... tail) {
        final Set<HeaderDelegateProvider> systemRegisteredHeaderProviders = stealAcquireRefToHeaderDelegateProviders();
        register(head, systemRegisteredHeaderProviders);
        for (Class<?> tt : tail) {
            register(tt, systemRegisteredHeaderProviders);
        }
    }
371997
public static <T> T head(Iterable<T> iterable) {
		return IteratorExtensions.head(iterable.iterator());
	}
410428
private void transferLinks(LinkedHashMapEntry<K,V> src,
                               LinkedHashMapEntry<K,V> dst) {
        LinkedHashMapEntry<K,V> b = dst.before = src.before;
        LinkedHashMapEntry<K,V> a = dst.after = src.after;
        if (b == null)
            head = dst;
        else
            b.after = dst;
        if (a == null)
            tail = dst;
        else
            a.before = dst;
    }
645505
def tail(self) -> 'List':
        """"""

        lambda_list = self._get_value()
        return List(lambda_list(lambda _, tail: tail))
873846
public static List<Offline> newOffline(Collection<Node> nodes) {
        return nodes.stream().map(Offline::new).collect(Collectors.toList());
    }
1094105
public static Specification<JpaTarget> hasNotDistributionSetInActions(final Long distributionSetId) {
        return (targetRoot, query, cb) -> {
            final ListJoin<JpaTarget, JpaAction> actionsJoin = targetRoot.join(JpaTarget_.actions, JoinType.LEFT);
            actionsJoin.on(cb.equal(actionsJoin.get(JpaAction_.distributionSet).get(JpaDistributionSet_.id),
                    distributionSetId));

            return cb.isNull(actionsJoin.get(JpaAction_.id));
        };
    }
939649
public Stream<Ontology> getOntologies(List<String> ontologyIds) {
    return dataService
        .findAll(
            ONTOLOGY,
            new ArrayList<Object>(ontologyIds).stream(),
            org.molgenis.ontology.core.meta.Ontology.class)
        .map(OntologyRepository::toOntology);
  }
1251915
public synchronized void print(java.io.PrintWriter printWriter)
    {
        printWriter.println("State Dump for:" + cclass.getName()
                            + " headSequenceNumber=" + headSequenceNumber + "(long)" + " tailSequenceNumber=" + tailSequenceNumber + "(long)"
                        );
        printWriter.println();

        printWriter.println("Sublists...");
        for (int i = 0; i < subLists.length; i++)
        {
            subLists[i].print(printWriter);
        } // for subLists...

    }
669801
public static <T> T[] offer(T head, @NotNull T[] tail) {
        T[] result = newArrayInstance(tail, tail.length + 1);
        result [0] = head;
        System.arraycopy(tail, 0, result, 1, tail.length);
        return result;
    }
1112265
public static void main(String[] args) {
    Treebank treebank = new DiskTreebank();
    CategoryWordTag.suppressTerminalDetails = true;
    treebank.loadPath(args[0]);
    final HeadFinder chf = new CollinsHeadFinder();
    treebank.apply(new TreeVisitor() {
      public void visitTree(Tree pt) {
        pt.percolateHeads(chf);
        pt.pennPrint();
        System.out.println();
      }
    });
  }
1057975
public static <T> List<T> tail(List<T> list)
	{
		if (list.isEmpty())
			return Collections.emptyList();
		else
			return list.subList(1, list.size());
	}
354108
public Instruction createList(final Instruction _newTail) {
      Instruction childExprHead = null;
      if (_newTail == null) {
         childExprHead = head;
         tail = head = null;
      } else {
         childExprHead = _newTail.getNextExpr();
         tail = _newTail;
         _newTail.setNextExpr(null);
         if (childExprHead != null) {
            childExprHead.setPrevExpr(null);
         }

      }
      return (childExprHead);
   }
647329
public void printAnswers(List<CoreLabel> doc, PrintWriter out) {
    for (CoreLabel wi : doc) {
      String answer = wi.get(AnswerAnnotation.class);
      String goldAnswer = wi.get(GoldAnswerAnnotation.class);
      out.println(wi.word() + "\t" + goldAnswer + "\t" + answer);
    }
    out.println();
  }
276087
@Override
  public void printHeads(final Parse parse) {
    if (parse == null || parse.getChildCount() == 0) {
      throw new IllegalArgumentException(
          "Can't return head of null or leaf Parse.");
    }
    final LinkedList<Parse> nodes = new LinkedList<Parse>();
    nodes.add(parse);
    // This is a recursive iteration over the whole parse tree
    while (!nodes.isEmpty()) {
      final Parse currentNode = nodes.removeFirst();
      // When a node is here its '=H' annotation has already happened
      // so it '=H' has to be removed to match with the head rules
      final String type = currentNode.getType().replace(HEADMARK, "");
      if (DEBUG) {
        System.err
            .println("-> Current Node: " + type + " " + currentNode.toString());
      }
      final Parse[] children = currentNode.getChildren();
      Parse headChild = null;
      if (children.length > 0) {
        headChild = this.headRules.getHead(children, type);
      }
      // For every child, if it is the head, annotate with '=H'
      // and also add to the queue for the recursive processing
      for (final Parse child : currentNode.getChildren()) {
        if (child == headChild) {
          child.setType(child.getType() + HEADMARK);
        }
        // add child to last of LinkedList which will
        // now take as currentNode the child of this child
        nodes.addLast(child);
      }
    }
  }
376567
public List<HeadedSyntacticCategory> getArgumentTypes() { 
    List<HeadedSyntacticCategory> arguments = Lists.newArrayList();
    HeadedSyntacticCategory cat = this;
    while (!cat.isAtomic()) {
      arguments.add(cat.getArgumentType());
      cat = cat.getReturnType();
    }
    return arguments;
  }