If I define a module as such:
module Module1
open System
let foo =
Console.WriteLine(\"bar\")
Then, in interactive do
I believe let foo = x is essentially a static value that gets evaluated immediately, once. If you want a parameterless function, you would need let foo () = Console.WriteLine("bar"), using it as foo ().
If you don't want to have to use the parentheses when calling, something like type Test () = static member foo with get () = System.Console.WriteLine("bar"), using it as Test.foo should work.