Natural Transformation Examples (1/4) ------------------------------------
data Tree a = Empty | Node a [Tree a]
toTree :: [a] -> Tree a
toTree [] = Empty
toTree (x:xs) = Node x [toTree xs]
`toTree` is a natural transformation. It is also a morphism from `[]` to `Tree` in the Category of \\(\\Hask\\) endofunctors. natural transformation commutative diagram
natural transformation commutative diagram