[Haskell-cafe] Haskell from SML - referrential Transparency?!

Jake McArthur jake.mcarthur at gmail.com
Tue Apr 19 21:28:49 CEST 2011


You can think of IO actions as values (which don't change)
representing imperative programs to execute (which may have different
results each time you execute them). So, `fa fb fc` represents the
exact same value as `fa fb fc`, but if you execute that value multiple
times you may get different results. Here are a couple safe ways to
execute IO actions:

* From your `main` function
* In GHCi (if the value you give it is an action, it *executes* it,
otherwise it *prints* it)

- Jake



More information about the Haskell-Cafe mailing list