Idris2/tests/idris2/pkg007/Another/One/Third.idr

11 lines
186 B
Idris
Raw Normal View History

2021-04-15 16:08:50 +03:00
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)