On Sat, Jun 07, 2003 at 08:24:41PM -0500, Stecher, Jack wrote: It sounds like you're on the right track...
> > You could get a moderately more efficient implementation by keeping > > the active list as a heap rather than a list. > > I had thought about that, and took the BinomialHeap.hs file from > Okasaki, but I must have a typo somewhere, because I was having typing > clashes that I couldn't easily clarify. At least, when I loaded the > BinomialHeap.hs into Hugs, it didn't complain, but when I tried to > create an empty heap using the heapEmpty function, Hugs screamed at me. > I got scared and fled the scene, retreating into the safety of lists. I don't think you should worry about this now, but the problem was problem that heapEmpty returns something like 'Heap a', for an undetermined type variable 'a'; you may need to specify the type of your empty heap in order for Hugs not to complain. Peace, Dylan
pgp00000.pgp
Description: PGP signature