open-sorcerers / madlib

Madlib: a compile-to-JS language written in Haskell, designed to make writing code a delight
https://github.com/madlib-lang/madlib
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

You wish ! #27

Closed aboeglin closed 3 years ago

aboeglin commented 3 years ago
aboeglin commented 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.

aboeglin commented 3 years ago

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.