[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] A nice way to implement the ANDing of the comparison of pairs of items in a sequence?


Subject: RE: [xsl] A nice way to implement the ANDing of the comparison of pairs of items in a sequence?
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Fri, 6 Sep 2013 11:33:05 +0000

> How about
>
> deep-equal($v[position() mod 2 = 0], $v[position() mod 2 = 1])
>
> Michael Kay

That, sir, deserves a standing ovation.

The succinctness and power of Michael's response reminds me of a story I
recently read:

The Lecture Without Words

At the meeting of the American Mathematical Society in 1903 the mathematician
Frank Nelson Cole gave a "lecture without words," silently performing the
multiplication

193 707 721 * 761 838 257 287 = 147 573 952 588 676 412 927

on the blackboard. The number on the right-hand side is 2^67 - 1, which the
17th-century French mathematician Marin Mersenne conjectured is prime. In
1876, Edouard Lucas managed to prove that it is composite, but gave no
indication of what numbers would divide it. The audience, knowing full well
how hard it is to factor 21-digit numbers, greeted Cole's presentation with a
standing ovation.


Current Thread