mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 01:30:22 +00:00
* fix benchmark - require json for Hash.to_json * better heuristic distinction of .d files - properly recongnize dtrace probes - recongnize \ in Makefile paths - recongnize single line `file.ext : dep.ext` make targets - recognize D module, import, function, and unittest declarations - add more representative D samples D changed from 31.2% to 28.1% DTrace changed from 33.5% to 32.5% Makefile changed from 35.3% to 39.4% See https://gist.github.com/MartinNowak/fda24fdef64f2dbb05c5a5ceabf22bd3 for the scraper used to get a test corpus.
8 lines
134 B
D
8 lines
134 B
D
template Fib(size_t N)
|
|
{
|
|
static if (N < 2)
|
|
enum Fib = size_t(1);
|
|
else
|
|
enum Fib = Fib!(N - 2) + Fib!(N - 1);
|
|
}
|