mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 17:21:59 +03:00
11 lines
186 B
Idris
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)
|