how to pause the console in F# language

f#

Solution

You may consider to wrap the pause function in compiler directives, since you probably don't want to have the same effect in release code.

(* your code here *)
#if DEBUG
System.Console.ReadKey(true) |> ignore 
#endif

Problem

Please tell me how I can pause the console window when running the program in F#. ``` open System let myList = [0..9] let myFunction = for n in myList do Console.WriteLine(n) myFunction ```

Original source