From 22fc8bffd0ee10d4e7e4ad7f4c65b472fea4fb50 Mon Sep 17 00:00:00 2001
From: Joe Zhao <ztuowen@gmail.com>
Date: Wed, 25 Mar 2015 15:14:35 +0800
Subject: first commit

---
 functor/h3.hs | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 functor/h3.hs

(limited to 'functor/h3.hs')

diff --git a/functor/h3.hs b/functor/h3.hs
new file mode 100644
index 0000000..1a048f6
--- /dev/null
+++ b/functor/h3.hs
@@ -0,0 +1,6 @@
+data ITree a = 
+    Leaf (Int -> a) | Node [ITree a]
+
+instance Functor ITree where
+    fmap f (Node x) = Node (fmap (fmap f) x)
+    fmap f (Leaf x) = Leaf (f.x)
-- 
cgit v1.2.3-70-g09d2