Copied from a K tutorial written by Grigore Rosu
sum.imp sums in sum
all numbers up to n
.
collatz.imp tests the Collatz conjecture for all numbers up to
m
and accumulates the total number of steps in s
.
primes.imp counts in s
all the prime numbers up to m
.