Here's a hardcoded example: http://codepad.org/klr8S1hi
I've tried numerous ways of automatically creating the appropriate call to fun in the bind template, but I've been unsuccessful. Maybe using some form of string mixin would work.. My biggest issue is that I can't modify variables at compile time. I wish there was some special CTFE int type which is only visible at compile-time and which we can use however we want. That way I could keep count of things, for example I could generate a list of indexes that can then be mixed in as a string.