From ef5f19da8865b53f6edf68041a8e270a28031955 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Sun, 5 Apr 2015 15:33:17 +0800 Subject: +H55 +H56 +Tree --- H56.hs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 H56.hs (limited to 'H56.hs') diff --git a/H56.hs b/H56.hs new file mode 100644 index 0000000..3cf7127 --- /dev/null +++ b/H56.hs @@ -0,0 +1,8 @@ +import Tree + +mirror :: Tree a -> Tree a -> Bool +mirror Empty Empty = True +mirror a@(Branch _ a1 a2) b@(Branch _ b1 b2) = (mirror a1 b2) && (mirror a2 b1) +mirror _ _ = False + +symmetric t = mirror t t -- cgit v1.2.3-70-g09d2