[Haskell-beginners] Help refactor monster function

Dániel Arató exitconsole at gmail.com
Tue Apr 19 08:14:22 UTC 2016


Hi guys,

Here is my solution to Problem 50 from Ninety-Nine Haskell Problems:
https://github.com/nilthehuman/H-99/blob/master/Logic.hs#L75

(`consume' is defined here:
https://github.com/nilthehuman/H-99/blob/master/Lists.hs#L107 )

I'm not satisfied with the code quality. I feel like especially `go',
`group' and `min2' should be more succint and readable.

How to refactor? Maybe there are some combinators that could help?

Thanks,
Daniel


More information about the Beginners mailing list