Use foldLeft to avoid stack overflow for Gen.frequency with large list
Merge pull request #62 from markmarch/topic/fold-left

Use foldLeft to avoid stack overflow for Gen.frequency with large list