Skip to content

Instantly share code, notes, and snippets.

@MaikKlein MaikKlein/bench.d
Created Mar 1, 2016

What would you like to do?
enum isEven(alias i) = i % 2 is 0;
void main()
import std.stdio;
import std.range: iota, join;
import std.algorithm.iteration: map;
import std.conv: to;
import std.meta: AliasSeq, Filter;
enum types = "AliasSeq!(" ~ iota(0,1000).map!(i => to!string(i)).join(",") ~ ")";
alias t = AliasSeq!(mixin(types));
alias evenTypes = Filter!(isEven,t);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.