7 ms·
Well, you DID sneak a monad in there :-)
by auggierose 5y ago
Well, you DID sneak a monad in there :-)
- tromp 5y agoRather unavoidable when turnOnLED's likely type is IO () ...
- auggierose 5y agoRather unavoidable when you have types like IO() in the first place.
- tromp 5y agoUse of that type is easily limited in Haskell code. For instance, in my chess counting project [1] only a few lines in Main.hs use IO (), while the other approximately thousand lines of code have nothing to do with IO (). [1] https://github.com/tromp/ChessPositionRanking https://github.com/tromp/ChessPositionRanking
- mordae 5y agoSo what? The point is to make it easy to program imperatively (with effects, where relevant) while simultaneously reclaiming the ability to check for correctness and maintain laziness by default. What's so good about implicit sequential evaluation? Shouldn't the effect ordering be explicit? Isn't explicit better than implicit?
- auggierose 5y ago> Isn't explicit better than implicit? That's the point, isn't it. No, explicit is not always better than implicit.
- deleted 5y ago[deleted]