Tutorial by Examples

long fib(long n) { return n < 2 ? n : fib(n - 1) + fib(n - 2); } struct FibStruct(int n) { // Remarks: n is a template ubyte[fib(n)] data; } void main() { import std.stdio : writeln; enum f10 = fib(10); // execute the function at compile-time pragma(msg, f10); /...

Page 1 of 1