Pretty much any where you see it do means the next value you see is of type unit. As unit is F# equivalent of "void" to be useful, it will typically be some function call that has a side effect (which is the case in both your examples).

It is necessary when calling functions within a class definition (example 1) but optional at the top level (example 2).

By on 12/30/2008 11:27 PM ()

There is definitely some sickness around "do". For example:

1
2
3
> do do do do do do do printfn "Hello";;
Hello
val it : unit = ()

[6]

By on 12/31/2008 6:09 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper