how about this: data Tree a = L a | N [Tree a] deriving Show l::a -> Tree a l = L n::a -> Tree a n x = N [L x] m::(a->Tree a) ->[a]-> Tree a m f list = N $ f <$> list run it like this: m l [2,3] m n [2,3] any good?