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

            current = current + 2;
            return(result);
        }
Example #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);
            }
        }