using StringTools; using Lambda; class Factorial { // iterative static function factorial1(n:Int):Int { var result = 1; while (1