main :: IO ()
main = do
    printTree exTree1

    -- drawback: cannot deduce a type
    printTree (everywhere  (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
    printTree (everywhere' (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
    -- if type mismatches, nothing will happen
    -- (this might potentially be bad)

    printTree (everywhere' (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree2)

    let plusStr a b
          | null a = b
          | null b = a
          | otherwise = a ++ "|" ++ b

    -- the different strategies
    printTree (everywhere  (mkT (foldWithDirectChildren plusStr "")) exTree2)
    printTree (everywhere' (mkT (foldWithDirectChildren plusStr "")) exTree2)
main :: IO ()
main = do
    printTree exTree1

    -- drawback: cannot deduce a type
    printTree (everywhere  (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
    printTree (everywhere' (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
    -- if type mismatches, nothing will happen
    -- (this might potentially be bad)

    printTree (everywhere' (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree2)

    let plusStr a b
          | null a = b
          | null b = a
          | otherwise = a ++ "|" ++ b

    -- the different strategies
    printTree (everywhere  (mkT (foldWithDirectChildren plusStr "")) exTree2)
    printTree (everywhere' (mkT (foldWithDirectChildren plusStr "")) exTree2)
main = do
    printTree exTree1

    -- drawback: cannot deduce a type
    printTree (everywhere  (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
    printTree (everywhere' (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
    -- if type mismatches, nothing will happen
    -- (this might potentially be bad)

    printTree (everywhere' (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree2)

    let plusStr a b
          | null a = b
          | null b = a
          | otherwise = a ++ "|" ++ b

    -- the different strategies
    printTree (everywhere  (mkT (foldWithDirectChildren plusStr "")) exTree2)
    printTree (everywhere' (mkT (foldWithDirectChildren plusStr "")) exTree2)