Bonjour,
Richard Jones wrote :
> Yes, I think there is. One of the two books I just read, either "ML
> for the working programmer" or the Oosaki book mentioned this. I
> don't have them to hand right now, but can look them up later if you
> want.
I don't have Paulson's book (ML for the working programmer) at hand
but what is sure is that this subject is deeply discussed in Okasaki's
book. Actually, it is the subject of Okasaki's thesis on which the
book is based.
www.cs.cmu.edu/afs/cs.cmu.edu/project/fox/mosaic/papers/cokasaki-thesis.ps
The book provides working SML code (also some code on Okasaki's home
pages) for strict/lazy purely functional deques. It has been ported to
Caml by Markus Mottl and included in many Caml data structures
libraries.
Brian Hurt wrote :
> 2) Because it never needs to reverse a list, the imperitive version
> may be marginally faster than my version. I haven't measured this,
> so your mileage may vary.
In my branch-and-bound code using LDS (limited discrepancy search),
the functional version (two lists with inversion expanded in the code)
was faster than the imperative one. I really don't know why.
Diego Olivier
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|