Right-to-left (was: Re: entry at other than main)
Scott Schwartz
schwartz at shire.cs.psu.edu
Sun Aug 27 14:17:19 AEST 1989
Henry Spencer writes:
| Dolf Grunbauer writes:
| >For those unknown to APL: do you know that APL is so compact that an
| >algorithm to get the first N primes can be written in just *ONE* expression
| >(of about 25 characters), including the reading of N from the terminal ?
|
| Yes, and a month afterward, even its author can't understand it without
| half an hour of study.
Just for fun, here it is:
P <- (2=+ /- 0=(iN)o.|iN)/iN
Where "<-" and "/-" are overstruck, "i" is iota, and "o" is the
little open circle. It takes about 10 minutes to read the page long
explaination in the handout I copied the expression from.
Believe it or not, I once had a physics professor who went through
"The C Programming Language" and translated some of the examples into
APL, and scribbled them in the margins. Now _that_ was scary.
--
Scott Schwartz <schwartz at shire.cs.psu.edu>
More information about the Comp.lang.c
mailing list