3 ms·
I was about to try to talk about the genuine elegance of Applicatives—and I'm more than happy to defend them in general—but then, yeah. In this instance, I'm no
by tel 11y ago
I was about to try to talk about the genuine elegance of Applicatives—and I'm more than happy to defend them in general—but then, yeah. In this instance, I'm not sure I'd be able to argue that the change was such a good choice.
liftIO (liftA2 (,) randomIO getCurrentTime)
Eh, I'm not sure I could defend it. I'd honestly probably actually do
bid <- liftIO randomIO
now <- liftIO getCurrentTime
- dllthomas 11y agoOf course, there is always https://ghc.haskell.org/trac/ghc/wiki/ApplicativeDo https://ghc.haskell.org/trac/ghc/wiki/ApplicativeDo
- tel 11y agoIt's worth noting that there's a small potential performance penalty to this if it's being called all the time and it's being lifted through a large transformer stack.