by tome · 2y ago · 0 comments
They seem naturally sequential and an imperative to me.
I can't imagine how a list of instructions would be clearer in haskell.
cook meat sauce = do
pan <- getPan
addTo pan meat
cookFor pan 10
addTo pan sauce
cookFor pan 3
food <- contents pan
pure foodAlthough written in an imperative style and thus superficially similar, the haskell differs in that it is referentially transparent.
I think that makes it objectively clearer, because it implies certain guarantees that nothing will surprise the reader.