Investigating the I/O Monad in Go

<p>In functional programming, we try to isolate&nbsp;<a href="https://en.wikipedia.org/wiki/Pure_function" rel="noopener ugc nofollow" target="_blank">pure</a>&nbsp;functions from&nbsp;<a href="https://en.wikipedia.org/wiki/Side_effect_(computer_science)" rel="noopener ugc nofollow" target="_blank">effectful&nbsp;</a>functions. Functions are considered pure if the output of a function depends on its inputs only and if the invocation of such a function does not change anything outside the scope of the function itself&nbsp;</p> <p>Data structures are considered immutable, i.e., instead of modifying a structure to change data, we create copies of that structure and apply the modifications to that copy.</p> <h2>Composition</h2> <p>When designing functions, we attempt to design them so the output of one function can be passed as an input to the next function, forming a new function.</p> <p>If all functions in a composition are pure, then the result of the composition is pure, too, so we can derive more complex scenarios from simpler ones.</p> <p><a href="https://medium.com/better-programming/investigating-the-i-o-monad-in-go-3c0fabbb4b3d"><strong>Read More</strong></a></p>