title: F# function is good but not when called from main
body: <p>I have <strong>F# function 'is_up'</strong> to ping the ip like below which works fine in <em>FSI REPL</em>(interactive), giving i.e. true for 8.8.8.8 and false for 8.8.8.1</p>
  
  <pre><code>let pingSender = new Ping()
  let is_up (t:int) (ip:string) =
      let reply = pingSender.Send(IPAddress.Parse(ip),t)
      reply.Status = IPStatus.Success
  </code></pre>
  
  <p>but not from main. Here I am always getting 'is down'</p>
  
  <pre><code>[&lt;EntryPoint&gt;]
  let main argv =
      let mutable ip = argv.[0];
      if is_up 3 ip then
          printfn "Host %A is up" ip
      else
          printfn "Host %A is down" ip 
      1
  </code></pre>