Closed aboeglin closed 3 years ago
cleanTCompMain = filter (/= '.') . reverse . takeWhile (/= '.') . reverse
Seems like I can't answer there because it's outdated, but mostly give something like:
E.Either
, I want to extract Either. So I reverse it, take all characters until I find a dot and reverse it again. It actually stops when finding a dot and does not include it in the matched sequence. So mostly I filter a dot in a String that can't possibly have a dot.
Thanks for your feedback, if you have follow up questions I'm happy to answer them. What I take from it is that types should be named consistently across the Solve module, and that beg mid trd
should be moved out of it, possibly renaming trd in lst so that it would be the shorts for beginning middle last.
<(1, 2)>