Advertisement
Guest User

Untitled

a guest
Apr 20th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.24 KB | None | 0 0
  1.  
  2.  
  3. import std.stdio;
  4.  
  5.  
  6. alias Clojure = void delegate();
  7.  
  8.  
  9. Clojure[] clojures;
  10.  
  11.  
  12. void main(){
  13.  
  14.     foreach(a; ["this is a test", "behold"])
  15.         foreach(c; a)
  16.             clojures ~= {write(c);};
  17.  
  18.     foreach(c; clojures)
  19.         c();
  20.  
  21.     writeln;
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement