
24 Apr
2016
24 Apr
'16
1:38 p.m.
On April 24, 2016 5:41:00 PM GMT+03:00, "Dániel Arató"
gatherRoots = chunk (partition (compare `on` root))
That doesn't typecheck. I think you meant
gatherRoots = chunk $ \ l@(x:_) -> partition (\y -> root x == root y) l
You are correct, that was an error in transcription.
P.S. You would be correct in claiming that this rewrite is too distant from the original to be of use. My apologies if this is the case.
No, this helps a lot, thanks! Reading pro Haskell like this helps me improve. It's way more advanced than what I could possibly come up with though. I'm still working my way through it. I'm glad it helped.
Gesh