diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-04-13 15:21:21 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-04-13 15:21:21 +0800 |
commit | a39aea354b071612c071d98125e879fe14c76a54 (patch) | |
tree | 9d960eb2c970245e4fa5ffc2b51c25e0547972fb /H61.hs | |
parent | 84e6753005e57827c78b50ad0a26ffa0d0da55e4 (diff) | |
download | h99-a39aea354b071612c071d98125e879fe14c76a54.tar.gz h99-a39aea354b071612c071d98125e879fe14c76a54.tar.bz2 h99-a39aea354b071612c071d98125e879fe14c76a54.zip |
+61 +62 +63
Diffstat (limited to 'H61.hs')
-rw-r--r-- | H61.hs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -0,0 +1,5 @@ +import Tree + +countLeaves Empty = 0 +countLeaves (Branch _ Empty Empty) = 1 +countLeaves (Branch _ t1 t2) = countLeaves t1 + countLeaves t2 |