Video: Andrei Alexandrescu at @ Lang.NEXT 2012
Martin Nowak
dawg at dawgfoto.de
Thu Apr 12 14:57:11 PDT 2012
On Thu, 12 Apr 2012 15:46:49 +0200, Jakob Ovrum <jakobovrum at gmail.com>
wrote:
> This video went up a while ago. I would like to comment on it, but I
> didn't see any thread about it, so here it is.
>
> Three Unlikely Successful Features of D
>
>
> http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5
>
> Thanks to Andrei Alexandrescu for this great presentation! Although I'm
> judging by the video alone, I feel you captivated the crowd quite well
> with this one :)
The generalized palindrome doesn't work with odd lengths.
simple fix:
bool palindrome(Range)(Range range) {
for (; !range.empty; range.popFront(), range.empty || range.popBack())
{
if (range.front != range.back)
return false;
}
return true;
}
More information about the Digitalmars-d-announce
mailing list