title: Traversing a rose tree with Data.Tree.Zipper
body: <p>I have a rose tree structure that I'm representing with Data.Tree. Each node in the tree is labeled with an (x,y) coordinate. I need to implement a way of finding the node in the tree that is nearest to a given query coordinate and adding a child to that node.</p>
  
  <p>I envision dividing this into two operations: </p>
  
  <ol>
  <li><p>traverse the tree to find the node that is nearest to a given query coordinate</p></li>
  <li><p>take the node found in the prior traversal and add to it a child labeled with the above query coordinate</p></li>
  </ol>
  
  <p>The only way I can think of doing this is to traverse the tree in step 1 using Data.Tree.Zipper, and then using that zipper in step 2 to insert a node in a specific location.</p>
  
  <p>I have two questions:</p>
  
  <ul>
  <li><p>Is this an effective way to approach the problem?</p></li>
  <li><p>If so, how do I use the functions in Data.Tree.Zipper to implement step 1 above? I'm finding the tree traversal difficult to implement because it requires recursion in two dimensions: depth and breadth.</p></li>
  </ul>