aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/rosetta/Sierpinski_triangle.bruijn
blob: 22659d18b37a6741f1629612b48fa19a8fd60670 (plain) (blame)
1
2
3
4
5
6
7
8
9
y [[1 (0 0)] [1 (0 0)]]

# infinite depth
triangle [y [[0 1 [[0]] 1 1]]]

:import std/Number .

# limited depth
triangle-n [y [[[[1 0 [[0]] 0 0] (=?1 [[1]] (2 --1))]]] (+7)]