Skip to content

Conversation

@ndmitchell
Copy link
Contributor

Two space leaks, squashed by using a strict accumulator.

Classic foldl with a lazy accumulator. Alternatively, the entire `indexInto` function could be replaced with `Data.List.elemIndex`.
Using a `foldr` to do a summation, resulting in a space leak. Fixed by switching to `foldl'` and then forcing the elements inside the pair.
@simonmar simonmar merged commit 62a88f7 into haskell:master May 16, 2016
simonmar added a commit that referenced this pull request May 16, 2016
Add a missing import following #64
erikd pushed a commit to erikd/happy that referenced this pull request Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants