Created
March 1, 2016 17:47
-
-
Save MaikKlein/531062e1f4cb2df879d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(",") ~ ")"; | |
writeln(types); | |
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