On 26-2-2013 5:19, bearophile wrote:
http://rosettacode.org/wiki/Truth_table#DSome changes: http://codepad.org/PEZWmrHG But it's not good enough yet :-) Maybe there are ways to produce a D version closed to the Go one.
I would have prefered to write:
bool xor(in bool A, in bool B) pure nothrow
return A != B;
}
But I couldn't figure out how to expand the boolean array to
an argument list. The Go example uses runtime reflection,
I believe.
Nice touch with the map, I still think in loops :)
