Logo

Programming-Idioms

History of Idiom 9 > diff from v7 to v8

Edit summary for version 8 by :

Version 7

2015-09-03, 17:18:59

Version 8

2015-09-05, 10:53:24

Idiom #9 Create a Binary Tree data structure

The structure must be recursive because left child and right child are binary trees too. A node has access to children nodes, but not to its parent.

Idiom #9 Create a Binary Tree data structure

The structure must be recursive because left child and right child are binary trees too. A node has access to children nodes, but not to its parent.

Code
data BT x = Ø | BT (BT x) x (BT x)