a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
30 lines
457 B
C#
30 lines
457 B
C#
public class Set<Element>
|
|
{
|
|
protected readonly Node[] sub;
|
|
public Set () { }
|
|
|
|
public struct Locator
|
|
{
|
|
public delegate void Replace (Node node);
|
|
public Locator (Replace put) { }
|
|
}
|
|
|
|
public class Node : Set<Element>
|
|
{ }
|
|
|
|
protected Locator locate (Element x)
|
|
{
|
|
Set<Element> parent = this;
|
|
return new Locator (new Locator.Replace (delegate (Node n) {
|
|
parent.sub[0] = n;
|
|
}));
|
|
}
|
|
}
|
|
|
|
static class SetTest
|
|
{
|
|
public static void Main ()
|
|
{
|
|
}
|
|
}
|