[Haskell-beginners] Learning Haskell with the help of trees
Bob Ippolito
bob at redivi.com
Sat May 10 18:25:47 UTC 2014
Sure, but you still have to make some arbitrary decisions that define the
strategy for making one tree out of two. It's harder when the data
structure doesn't make that decision for you by its definition. Write that
function and then your delete is practically finished.
On Saturday, May 10, 2014, Michal Kawalec <michal at bazzle.me> wrote:
> On 10.05.2014 16:27, Bob Ippolito wrote:
> > In order to implement delete you need to have some sort of merge
> > operation for the cases where the node being deleted has more than one
> > child. In this case your tree data structure doesn't appear to be a
> > search tree or balanced in any way so it's much harder to generally
> > decide how delete should work.
>
>
>
> But this is a binary (albeit unbalanced, which changes nothing) tree :)
>
>
> Michal
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140510/23f5b362/attachment.html>
More information about the Beginners
mailing list