Refactored code to use scala.math.BigInt instead of java.math.BigInteger,
and added $:hsort (or /^), which requires an array and a comparison function