
10 Jul
2014
10 Jul
'14
9:24 a.m.
On Wed, Jul 09, 2014 at 11:02:14PM -0300, Marcelo Lacerda wrote:
Hi I'm just starting with haskell and want some help with it.
I tried to solve the Store Credit[1] problem from google code jam just to practice, the result was a slow code[2] that I find hard to read.
Can you guys give me some directions on how to improve it?
[1] - https://code.google.com/codejam/contest/351101/dashboard#s=p0 [2] - http://pastebin.com/jNGxGP5H
Don't know about efficiency, but I never liked (!!). Maybe computing all pairs+positions in advance using |zip| would be a little better? I attach my .hs; code is quite caveman-Haskell, but hopefully the idea is clear -F