[Haskell-beginners] Using my first map instance

Darren Grant therealkludgy at gmail.com
Sat Sep 29 02:44:57 CEST 2012

On Fri, Sep 28, 2012 at 4:57 PM, Sean Perry <shaleh at speakeasy.net> wrote:
> 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.

Hah I didn't know the Haskell Wiki had a Project Euler page. I'll
definitely be reviewing with that resource.

I notice the use of Array instead of Map, and the careful use of
unboxed types. :)


More information about the Beginners mailing list