import math
sub factor(n)
results = []
for i = 1; i <= sqrt(n); i++
if n % i == 0
newFactors = [i, n / i]
results.append(newFactors)
end
end
return results
end
print factor(2000)
|
Mint is a scripting language that I originally started as a parsing experiment. It supports operator precedence, dynamic arrays, objects, constructors, and first class functions. One of my largest projects, Mint can be thought of as a simplified version of the Ruby language. I wrote this project in Java.