
12 Jul
2012
12 Jul
'12
6:23 p.m.
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