one-liner wars
one-liner wars
(games, programming)Ken Iverson, the inventor of APL, has been credited with aone-liner that, given a number N, produces a list of the primenumbers from 1 to N inclusive. It looks like this:
(2 = 0 +.= T o.| T) / T
where "o" is the APL null character, the assignment arrow is asingle character, and "i" represents the APL iota.