[Haskell-cafe] Memory allocation in extractor function (newbie question)

2008-04-07 Thread Alexander Kireyev
Hello, While trying to write a program for the countPaths Code Jam problem I ran into what seems to me as a weird behaviour in terms of memory allocation. The task is to count the number of way you can spell a certain word by walking some path on a board of letters. Being a newbie I started

Re: [Haskell-cafe] Memory allocation in extractor function (newbie question)

2008-04-07 Thread Alexander Kireyev
On Mon, Apr 7, 2008 at 4:16 PM, Yitzchak Gale [EMAIL PROTECTED] wrote: You didn't show us the code for countForPoints. I'll bet you wrote something like countForPoints area ls count points = sum $ map (countPathsFrom area (count + 1) ls) points Unfortunately, the standard sum function