On 6/10/22 07:38, Ali Çehreli wrote:
> I played with that toString function but for some reason it prints all
> Ts. (?)
Fixed it by changing one of the lambdas to take by reference:
void toString(scope void delegate(in char[]) sink) const {
import std.algorithm;
sink.formattedWrite!"%-(%-(%s %)\n%)"(
elements[].map!((ref row) => row[].map!(column => column ? 'T' :
'f')));
// ^^^
}
I still don't understand the reason though. The rows would be copied
without ref but should retain their type as bool[3], a static array. (?)
Ali