Transform an IO action into a similar IO action
that performs the original action only once.
You can choose to perform the original action
in one of two ways:
lazily (might never be performed)
eagerly (concurrently performed)
Special thanks to shachaf and headprogrammingczar from #haskell irc
for helping me reason about the behavior of this library.