3 ms·
That's what I said.
by chongli 13y ago
That's what I said.
- tmoertel 13y agoI wasn't contradicting you but trying to reinforce the point that there's an equivalence between "impure" functions and pure functions that produce actions (having impure effects if sequenced). In particular, I wanted to highlight that (mapM_ print) is not somehow more impure than (map print). Many people seem to believe that it is.
- chongli 13y agoIndeed. The source code of mapM_ is literally: mapM_ f as = sequence_ (map f as)