Javascript to Elm

65: Haskell I/O

Informações:

Synopsis

It as dawned on me as I have tried to find a better way to number, categorize this episodes, that each unit has about a dozen lessons. So Unit 4, that we’ll cover now are lessons 20-23. IO in Haskell avoiding state is the one of the key tenants of Haskell. So how does Haskell rectify that tenant with the need to acutally makes changes to the outside world? like files, network requests, or other types of interaction You should know this by now. Types!! Special parameterized type name? you guessed it, IO Any value in IO context MUST stay in this context. This prevents it from clouding up or haskell environment of purity. For refresher, when I say purtity, what I mean is that it upholds referential transparency and doesn’t change state. Like a pure function. IO makes it impossible to use values that are from IO in pure functions where, that function is not expecting to get polluted values that can’t really be trusted. PSA Why writing every example is so important. Even as I write out the samples I had