예제 #1
0
        static void Main(string[] args)
        {
            IList <int> l = new Node <int>(1, new Node <int>(3, new Empty <int>()));

            IElementVisitor <int, int> test =;

            while (l.IsEmpty() == false)
            {
                Console.Out.WriteLine(l.Visit <int>(test));
                l = l.Tail();
            }

            Console.ReadKey();
        }
예제 #2
0
파일: List.cs 프로젝트: JoZonneveld/Per1.4
 public U Visit <U>(IElementVisitor <T, U> ev)
 {
     return(ev.OnSome(value));
 }
예제 #3
0
파일: List.cs 프로젝트: JoZonneveld/Per1.4
 public U Visit <U>(IElementVisitor <T, U> ev)
 {
     return(default(U));
 }