我在文件中有以下代码Test.fs
:
namespace Testing
module test1 =
let Run =
printfn "Test1"
module test2 =
let Run =
printfn "Test2"
在我的Program.fs
电话中:
[<EntryPoint>]
let main argv =
let sw = Stopwatch.StartNew()
printfn "%A" Testing.test1.Run
sw.Stop()
printfn "Problem took %d minutes, %d seconds, and %d milliseconds" sw.Elapsed.Minutes sw.Elapsed.Seconds sw.Elapsed.Milliseconds
let s = Console.ReadLine()
0 // return an integer exit code
这输出
测试1
测试2
Test2
即使我只是在打电话,为什么还在输出Test1.Run
?