Pastes with ufcs tag

 

# Paste Title Author Source
1 #06ca412f A simple UFCS (Uniform Function Call Syntax) example dejan
// Shamelessly taken from:
//   httpp://www.gamedev.net/blog/1140/entry-2254754-uniform-function-cal
2 #f4fc6a92 Units nazriel
struct Weight
{
    size_t amount;
	alias amount this;
}

@property Weight grams(size_t amount)
{
  
3 #039c3f02 A very nice example of UFCS and delegates. dejan
import std.stdio;

void times(int n, lazy void dg) { 
  while(n--) { 
    dg(); 
  } 
} // times() f