Naive question on lists of duplicates

Dylan Thurston
Sun, 8 Jun 2003 11:41:22 +0200

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.2 (GNU/Linux)