Revamped lex(). Also fixed stdlib's array.reduceRight().