Why are all my functions being run even though I'm only calling one function in one module?

一个人想着一个人 提交于 2019-12-06 11:29:42

test1.Run is not a function, it is a value. When you open a module you execute all top-level code in that module. In this case you are defining test1.Run and test2.Run which are both bindings rather than functions.

I can't tell from what you posted exactly what is happening, but it's clear that your main function is not getting called, otherwise printfn "%A" Testing.test1.Run would print <null> and printfn "Problem took %d minutes, %d seconds, and %d milliseconds" sw.Elapsed.Minutes sw.Elapsed.Seconds sw.Elapsed.Milliseconds would print something as well.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!