小编Amp*_*231的帖子

F#交互式窗口问题

我在http://www.tryfsharp.org上的交互式窗口中收到此错误.它在视觉工作室工作正常,我不知道如何解决它.任何帮助将不胜感激

let randomNumberGenerator count =
    let rnd = System.Random()
    List.init count (fun numList -> rnd.Next(0, 100))

let rec sortFunction = function
| [] -> []
| l -> let minNum = List.min l in
       let rest = List.filter (fun i -> i <> minNum) l in
       let sortedList = sortFunction rest in
       minNum :: sortedList

let List = randomNumberGenerator 10
let sortList = sortFunction List
printfn "Randomly Generated numbers in a NON-SORTED LIST\n"
printfn "%A" List
printfn "\nSORTED …
Run Code Online (Sandbox Code Playgroud)

f# f#-interactive

0
推荐指数
1
解决办法
205
查看次数

标签 统计

f# ×1

f#-interactive ×1