How can I use a user inputted value in my Function in F#
<p>I'm trying to make a simple factorial function in F# that uses a value inputted from the user (using the console, I don't know if that makes any difference) but I can't seem to find any solution to be able to use the value from the user in my function.</p>
<pre><code>    open System

    let rec fact x =
        if x &lt; 1 then 1
        else x * fact (x - 1)

    let input = Console.ReadLine()
    Console.WriteLine(fact input)
</code></pre>
<p>It constantly gives me the error saying &quot;This expression was expected to have type &quot;int&quot; but here has type &quot;string&quot;&quot;.  If anyone has any idea on how to make it work properly (or at least can tell me what I need to do to convert my user inputted value into an INT, that would be greatly appreciated.</p>