public override Bookmark <T>?Next() { return((_s.right != SSearchTree <T> .Empty) ? new SSearchTreeBookmark <T>(_s.right ?? throw new System.Exception("PE23"), true, _stk, Position + 1) // ok : (_stk == SList <SSearchTree <T> > .Empty) ? null : new SSearchTreeBookmark <T>((_stk?.First() ?? throw new System.Exception("PE24")).Value, false, //ok (_stk ?? throw new System.Exception("PE25")) - 0, Position + 1)); }
private bool FindElementIn100Helper(SList <Payload> list, Payload toBeFound) { bool output = false; for (Bookmark <Payload> current = list.First(); current != null; current = current.Next()) { if (current.Value.Equals(toBeFound)) { output = true; break; } } return(output); }