using System; public delegate Mapper[T,V] (mutable item : T) : V; public interface ITree[T] { Map[V] (mutable mapper : Mapper[T,V]) : void; } public class Tree[T] : ITree[T] { mutable item : T; public this (mutable item : T) { this.item = item; } public Map[V] (mutable mapper : Mapper[T,V]) : void { def _new_item = mapper (item); (); } } class X { private themap (mutable i : int) : string { String.Format ("AA {0,4} BB", i); } Test () : void { mutable tree = Tree (3); tree.Map ( Mapper (themap)); } static Main () : void { mutable x = X (); x.Test (); } } /* BEGIN-OUTPUT END-OUTPUT */