示例#1
0
        public Option <int> MoveNext()
        {
            var result = new NonEmpty <int>()
            {
                Value = current
            };

            current = current + 2;
            return(result);
        }
示例#2
0
        public Option <int> MoveNext()
        {
            var result = new NonEmpty <int>()
            {
                Value = current
            };

            current = current + 1;
            if (current > Max)
            {
                return(new Empty <int>());
            }
            else
            {
                return(result);
            }
        }