Hi,
Takayuki Muranushi wrote:
sunPerMars :: [Double]
sunPerMars = (/) <$> sunMass <*> marsMass
Sadly, this gives too many answers, and some of them are wrong because
they assume different Earth mass in calculating Sun and Mars masses,
which led to inconsistent calculation.
This might be related to the problem adressed by Sebastian Fischer, Oleg
Kiselyov and Chung-chieh Shan in their ICFP 2009 paper on purely
functional lazy non-deterministic programming.
http://www.cs.rutgers.edu/~ccshan/rational/lazy-nondet.pdf
An implementation seems to be available on hackage.
http://hackage.haskell.org/package/explicit-sharing
Tillmann
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe