示例#1
0
            public int LastIndexOf(object x)
            {
                var idx = Tail.LastIndexOf(x);

                return(idx >= 0 ? 1 + idx : Head.Equals(x) ? 0 : -1);
            }
示例#2
0
            public int IndexOf(object x)
            {
                var idx = Tail.IndexOf(x);

                return(Head.Equals(x) ? 0 : idx >= 0 ? 1 + idx : -1);
            }