add illustration samples

This commit is contained in:
Oli Sturm
2022-07-22 15:00:53 +01:00
parent 0a28574514
commit 250d86bafa
5 changed files with 58 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
data Color = R | B
data RedBlackSet a = E | T Color (RedBlackSet a) a (RedBlackSet a)
balance B (T R (T R a x b) y c) z d = T R (T B a x b) y (T B c z d)
balance B (T R a x (T R b y c)) z d = T R (T B a x b) y (T B c z d)
balance B a x (T R (T R b y c) z d) = T R (T B a x b) y (T B c z d)
balance B a x (T R b y (T R c z d)) = T R (T B a x b) y (T B c z d)
balance color a x b = T color a x b