Erik de Castro Lopo wrote:
for (int i=0;i<n;i++)
 cout << i << endl;

Shouldn't you put parentheses around on or the other of those
left shift operators? :-)

Now, << was left-associative, wasn't it? Or was it? ;-)

If you want pristine beauty, you should have a look the function
to find the intersection of two lists in Ocaml:

let rec intersect lst =
> [...]

To make this thread go totally off-topic, here's the same in Q:

intersect Xs [Y|Ys] = [Y|intersect Xs Ys] if any (=Y) Xs;
                    = intersect Xs Ys otherwise;

Now which one looks prettier? Sorry, couldn't resist. ;-)

Albert

--
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  [EMAIL PROTECTED], [EMAIL PROTECTED]
WWW:    http://www.musikinformatik.uni-mainz.de/ag

Reply via email to