main = do -- your code goes here
print $isFlat
[Node
1, Node
2, Node
3] print $isFlat
[Node
1, Node
2, Branch
[Node
3, Node
4, Node
5], Node
6]
data Tree a = Node a | Branch [Tree a]
isFlat
:: [Tree a
] -> BoolisFlat
= all isNode
where isNode (Node _) = True
isNode _ = False
bWFpbiA9IGRvCS0tIHlvdXIgY29kZSBnb2VzIGhlcmUKCXByaW50ICRpc0ZsYXQgW05vZGUgMSwgTm9kZSAyLCBOb2RlIDNdCglwcmludCAkaXNGbGF0IFtOb2RlIDEsIE5vZGUgMiwgQnJhbmNoIFtOb2RlIDMsIE5vZGUgNCwgTm9kZSA1XSwgTm9kZSA2XQoKZGF0YSBUcmVlIGEgPSBOb2RlIGEgfCBCcmFuY2ggW1RyZWUgYV0KCmlzRmxhdCA6OiBbVHJlZSBhXSAtPiBCb29sCmlzRmxhdCA9IGFsbCBpc05vZGUgd2hlcmUKCQkJCQkJaXNOb2RlIChOb2RlIF8pID0gVHJ1ZQoJCQkJCQlpc05vZGUgXyA9IEZhbHNl