IO a The type of actions that return values of type a
IO Char The type of actions that return a character IO() The type of purely side effecting actions that return no result value
Until this US Thanksgiving, I never realized that monads and turkey go together so well! Thank you Erik for your excellent tutorials. Hopefully the future of code will be more sane from your efforts =)
To be sure: once an expression involves IO, is it possible to ever derive a type that is not IO'd from it? I suspect not.
Thanks for the palm tree. It's a great place to be lazy, as its recursive structure bends over the ever-changing sea of waves.
You can do that using my all time favorite non-function unsafePerformIO :: IO a -> a. Keep in mind that as the name warns you, it is unsafe, very unsafe.
I'm having a problem downloading or displaying this video. When downloading it gets to 6% and stops. If I try and display it in the in-line Silverlight player and skip forward to eight minutes or so it has a media failure. I'm seeing the same problem with many of the PDC videos, e.g (WMV high):
http://microsoftpdc.com/Sessions/FT24
...Stefan
In essence, the point of the IO monad is to "tag" values as IO when there's a possibility of state. Once you enter the dimension of state, you can of course not remove the idea that side effects have occured. Therefore, it is recommended to keep your code pure.
Using do-notation and the monadic functions, it isn't too hard to make working with monads not too difficult, and for some, fun =)
Now to examine why anyone would want to soil an otherwise clean language, i.e. the use-cases.
I cannot download or play WMV file. Download stops at about 8%.
Where are you located?C
Download of WMV finishes for me after 7.90 MB. Please don't make me download WMV (High) !
I am in New Zealand.
In general downloading this video series has been very slow. It looks like the maximum bandwidth is about 200KBytes/s . Normally I can get 900K - 1.2 MBytes/s from microsoft.
Still - it is an extremely interesting series and very worthwhile. Even if it just turns out (for me) to be background to F# and Linq.
-G