Re: Pattern Matching

"[[[[a,b],c],[d,e]],[f,g]]"

(0, (1, 19))
(1, (2, 12))
(2, (3, 9))
(3, (4, 6))
(4, (a, 5, 5))
(5, (8, 8))
(6, (b, 7, 7))
(7, (8, 8))
(8, (11, 11))
(9, (c, 10, 10))
(10, (11, 11))
(11, (18, 18))
(12, (13, 15))
(13, (d, 14, 14))
(14, (17, 17))
(15, (e, 16, 16))
(16, (17, 17))
(17, (18, 18))
(18, (25, 25))
(19, (20, 22))
(20, (f, 21, 21))
(21, (24, 24))
(22, (g, 23, 23))
(23, (24, 24))
(24, (25, 25))
(25, (0, 0))
(26, (0, 0))