[Haskell-beginners] Help : foldl skipping one value in list
David Place
d at vidplace.com
Wed Nov 9 17:17:10 CET 2011
On Nov 9, 2011, at 12:18 AM, Lev Broido wrote:
> Hi
> I am implementing toy loop search algorithm in graph .
> I encountered strange problem -- it seems , that fold doesn't run on the whole list .
> Code is at http://hpaste.org/53776
> Section in question is updVis function
> Problem occurs when _newStateMap_2 is being calculated
> Please advise.
Your code is quite complex for the task. Your analysis that the problem lies with foldl' not consuming the whole list is extremely unlikely. Probably, the problem is elsewhere. Try building your solution more from the bottom up and unit testing the components.
More information about the Beginners
mailing list