"H. S. Teoh" <hst...@quickfur.ath.cx> wrote in message news:mailman.186.1376878962.1719.digitalmar...@puremagic.com... > On Sun, Aug 18, 2013 at 06:52:14AM +0200, deadalnix wrote: > [...] >> I feel pretty confident I can do a wat speech for D. > [...] > > Please do, I'm curious to hear it. :) >
import std.algorithm : filter, map; void main() { foreach(c; map!"a"("hello")) // Identity map function static assert(c.sizeof == 4); // Passes foreach(c; filter!"true"("hello")) // Pass-all filter static assert(c.sizeof == 4); // Passes foreach(c; "hello") static assert(c.sizeof == 4); // Fails } WAT.