public BinomiKeko union(BinomiKeko eka, BinomiKeko toka) {
        BinomiKeko keko = new BinomiKeko();
        keko.root = merge(eka, toka);
        if (keko.root == null) {
            return keko;
        }
        keko.keonKoko = eka.keonKoko+toka.keonKoko;
        BinomiNode prev = null;
        BinomiNode current = keko.root;
        BinomiNode next = current.sisar;
        while (next != null) {
            if ((current.lastenLkm != next.lastenLkm) || (next.sisar != null) && (next.sisar.lastenLkm == current.lastenLkm)) {
                prev = current;
                current = next;
            }
            else {
                if (current.arvo <= next.arvo) {
                    current.sisar = next.sisar;
                    link(next, current);
                }
                else {
                    if (prev == null) {
                        keko.root = next;
                    }
                    else {
                        prev.sisar = next;
                    }
                    link(current, next);
                    current = next;
                }
            }
            next = current.sisar;
        }
        return keko;
    }