此代码是没有行的树形图。如何在此代码中实现和绘制线条?
main = collage 700 700 ( drawTree exampleTree (0,0) 1)
drawNode name = group
[filled red <| circle 50
, text <|fromString name]
type Tree = Node String Tree Tree | Nil
exampleTree = Node "Me" (Node "Mother"
(Node "Grandmother" Nil Nil)
(Node "Grandfather" Nil Nil))
(Node "Father"
(Node "Grandfather" Nil Nil)
(Node "Grandmother" Nil Nil))
drawTree : Tree ->(Float, Float) -> Float -> List Form
drawTree tree (x,y) depth = case tree of
(Node ss t1 t2 )-> move (x,y) (drawNode ss) :: (List.append (drawTree t1 (x+100+depth,y+100) (depth+50)) (drawTree t2 (x-100-depth,y+100)(depth+50)))
Nil -> []