我是 haskell 的新手,我想在课堂表演中实例化 Tree a。
data Tree a = Null
|Node (Tree a) a (Tree a)
instance Show (Tree a) where
show Null = ""
show Node ((Tree l) (v) (Tree r)) = "|"--I don´t know how i can do this step
谢谢你的帮助。
我是 haskell 的新手,我想在课堂表演中实例化 Tree a。
data Tree a = Null
|Node (Tree a) a (Tree a)
instance Show (Tree a) where
show Null = ""
show Node ((Tree l) (v) (Tree r)) = "|"--I don´t know how i can do this step
谢谢你的帮助。