Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static <T> List<T> cons(T x, Collection<? extends T> xs) {
        ArrayList<T> result = new ArrayList<>(xs.size() + 1);
        result.add(x);
        result.addAll(xs);
        return result;
    }
}