Algebraic data types: Difference between revisions
C# changed output to look more like a tree
(Added C#) |
(C# changed output to look more like a tree) |
||
Line 285:
public void Print(int indent = 0) {
if (this != E) Right.Print(indent + 1);▼
Console.WriteLine(new string(' ', indent * 4) + ToString());
if (this
▲ Right.Print(indent + 1);
}
Line 308 ⟶ 307:
{{out}}
<pre>
[]▼
[B8]▼
[
[
[
[]
[]
[
[]
[B12]▼
[]
[
▲ [B5]
[]
▲ []
[B7]▼
[]▼
[]▼
▲ [B12]
[B10]
[B9]
[]
▲[B8]
[]
[
[]
[]
[
[]
[B4]
[]
[
[]
▲ []</pre>
=={{header|Clojure}}==
|