public class ListePile implements Pile {
    private Cellule liste;
    private int size;
    public ListePile() {
        this.liste = null;
        this.size = 0;
    }
    public void push(int n) {
        this.liste = new Cellule(n, this.liste);
        size++;
    }
    public int pop() {
        size--;
        int e = liste.hd();
        liste = liste.tl();
        return e;
    }
    public int peek() { return liste.hd(); }
    public boolean isEmpty() { return this.liste == null; }
    public int size() { return this.size; }
}
