Naive question on lists of duplicates
Sun, 8 Jun 2003 11:41:22 +0200
Content-Type: text/plain; charset=us-ascii
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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
-----END PGP SIGNATURE-----