hope: A non-pure functional language

- Functional with strict typed.
- Polymorphic type using typever.
- Example: Calculate prime numbers by sieve of Eratosthenes.
! Lazy prime number generation in HOPE dec from : num -> list num; --- from n <= n ::: from succ (n); dec filter : num # list num -> list num; --- filter (x, y :: ys) <= if y mod x = 0 then filter (x, ys) else y ::: filter (x, ys); dec sieve : list num -> list num; --- sieve (x :: xs) <= x ::: sieve filter (x, xs); dec upto : num # list num -> list num; --- upto (e, x :: xs) <= if e < x then [] else x :: upto (e, xs); dec primes : num -> list num; --- primes n <= upto (n, sieve (from 2));