fn is_prime(n: @Int) -> Bool {
    if n <= 1 {
        return false;
    }
    
    let i: Int = 1;
    let limit = ceil(sqrt(n - 1));

    while i < limit {
        i = i + 1;

        if n % i == 0 {
            return false;
        }
    }

    return true;
}

let array = arr<Int>();
let it: Int = 0;

while it < 100000 {
    if is_prime(it) {
        array.push(it.deref());
    }

    it = it + 1;
}

if array.len() != 9592 {
    panic("Invalid Int of primes");
}