1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
namespace jive { public class ChainedMapper<Left, Middle, Right> : Mapper<Left, Right> { readonly Mapper<Left, Middle> left; readonly Mapper<Middle, Right> right; public ChainedMapper(Mapper<Left, Middle> left, Mapper<Middle, Right> right) { this.left = left; this.right = right; } public Right map_from(Left item) { return right.map_from(left.map_from(item)); } } }