Jul 8, 2011

f# essential - part 11 - ignore function

If you call a function which does not return unit type, you can not call it like the following.

let f1() = 
    //do some side effect stuff
    "f1"
f1()

You have to do the following

f1() |> ignore
//or 
let _ = f1()