rebol[]for n 10 9876 1[m: n f: true while[m > 9][a: to-integer(/ m 10)f: f and((mod m 10)< mod a 10)m: a]if f[print n]]