Skip to content

Instantly share code, notes, and snippets.

@mertcanekiz
Created March 31, 2020 16:06
Show Gist options
  • Save mertcanekiz/453b257206bb2173d571922b4309e7b1 to your computer and use it in GitHub Desktop.
Save mertcanekiz/453b257206bb2173d571922b4309e7b1 to your computer and use it in GitHub Desktop.
using System;
using System.Collections;
public abstract class IntSeq : IEnumerable
{
public abstract int Size { get; set; }
public abstract void clear();
public abstract void unshift(int item);
public abstract int shift();
public abstract void push(int item);
public abstract int pop();
public abstract IntSeqEnumerator GetEnumerator();
IEnumerator IEnumerable.GetEnumerator()
{
return (IEnumerator) GetEnumerator();
}
}
public abstract class IntSeqEnumerator : IEnumerator
{
object IEnumerator.Current { get => Current; }
public abstract int Current { get; }
public abstract bool MoveNext();
public abstract void Reset();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment