Idris2/tests/idris2/pkg007/Another/One/Third.idr
2021-04-15 14:08:50 +01:00

11 lines
186 B
Idris

module Another.One.Third
import A.Path.Of.Dires.First
%default total
export
map : (a -> b) -> Tree a -> Tree b
map f (Leaf a) = Leaf (f a)
map f (Node l r) = Node (map f l) (map f r)