I think you do not understand what this line means:
let a = System.Console.WriteLine("Function A")
It assigns the result from System.Console.WriteLine("Function A") to a . If you run it, you will see that a printed as unit :
val a : unit = ()
And at that time, "Function A" was already written to the console.
Perhaps you need a function, not a value:
let a() = System.Console.WriteLine("Function A")
It can be called using a() . If you put it all together:
let a() = System.Console.WriteLine("Function A") let b() = System.Console.WriteLine("Function B") let c() = System.Console.WriteLine("Function C") c() b() a()
You will get what you expect:
Function C Function B Function A
source share