private void StackInitializeSuffixes() { AddSuffix("COPY", new NoArgsSuffix <StackValue <T> > (() => new StackValue <T>(this))); AddSuffix("PUSH", new OneArgsSuffix <T> (toPush => InnerEnumerable.Push(toPush))); AddSuffix("POP", new NoArgsSuffix <T> (() => InnerEnumerable.Pop())); AddSuffix("PEEK", new NoArgsSuffix <T> (() => InnerEnumerable.Peek())); AddSuffix("CLEAR", new NoArgsVoidSuffix(() => InnerEnumerable.Clear())); }
private void QueueInitializeSuffixes() { AddSuffix("COPY", new NoArgsSuffix <QueueValue <T> > (() => new QueueValue <T>(this))); AddSuffix("PUSH", new OneArgsSuffix <T> (toPush => InnerEnumerable.Enqueue(toPush))); AddSuffix("POP", new NoArgsSuffix <T> (() => InnerEnumerable.Dequeue())); AddSuffix("PEEK", new NoArgsSuffix <T> (() => InnerEnumerable.Peek())); AddSuffix("CLEAR", new NoArgsVoidSuffix(() => InnerEnumerable.Clear())); }