Module Program
Sub Main()
Dim rand As Func(Of Integer, Integer) = AddressOf New Random(0).Next
Dim cols = {"", "X", "Y", "Z"}
Dim rows = 3
Dim result =
<%= Iterator Function()
For Each col In cols
Yield
Next
End Function() %>
<%= Iterator Function()
For Each col In cols
Yield | <%= col %> |
Next
End Function() %>
<%= Iterator Function()
For r = 1 To rows
Yield _
<%= Iterator Function()
For key = 0 To cols.Length - 1
Dim col = cols(key)
Yield | <%= If(key > 0, rand(10000), r) %> |
Next
End Function() %>
Next
End Function() %>
Console.WriteLine(result)
End Sub
End Module