[Haskell-beginners] Using my first map instance

Sean Perry shaleh at speakeasy.net
Sat Sep 29 01:57:44 CEST 2012


On Sep 28, 2012, at 3:15 PM, Darren Grant wrote:
> 
> I've been looking into memoization techniques for Haskell and am
> currently trying different approaches. The version below is my current
> attempt, a no-go right off the bat because of the dense fromList
> domain. However, the simplicity of the expressions is nice. Is there
> an elegant mechanism that can replace the fromList comprehension that
> will only process exactly the values requested?  It seems a bit much
> to ask, and I'm beginning to suspect that imperative approaches are
> better for solving this particular memo problem.
> 


Have you looked at http://www.haskell.org/haskellwiki/Euler_problems/11_to_20#Problem_14?

The page is full of interesting and fast solutions once you have worked out your own versions.




More information about the Beginners mailing list