USING: math.ranges sequences ; : factorial ( n -- n ) [1,b] product ;