public bool MoveNext() { var next = _current.GetNext(); if (!next.HasValue) { return(false); } _currentValue = next.Value.First; _current = next.Value.Second; _moved = true; return(true); }
public Cons(T value, Sequence <T> rest) { _value = value; _rest = rest; }
public void Reset() { _current = _enumerable; }
public FunctionalEnumerator(IFunctionalEnumerable <T> val) { _moved = false; _enumerable = val; _current = _enumerable; }