Michael,<div><br></div><div>I had some code lying around, experimenting on tying-the-knot in the context of trees.<br><br>I&#39;ve just pushed it to github, hoping it can be helpful to you. The data type is slightly different to yours but the ideas should apply.</div>

<div><br></div><div><a href="https://github.com/ozgurakgun/knot-tree/blob/master/KnotBinTree.hs">https://github.com/ozgurakgun/knot-tree/blob/master/KnotBinTree.hs</a></div><div><br></div><div>HTH,</div><div>Ozgur<br><br>


</div>