我在这个示例中的一些代码中注意到包含>>运算符:
let printTree =
tree >> Seq.iter (Seq.fold (+) "" >> printfn "%s")
Run Code Online (Sandbox Code Playgroud)
>>运营商的意思/做什么?
非常感谢,现在它更加清晰.这是我为了得到它而生成的我的例子:
open System
open System.IO
let read_lines path = File.ReadAllLines(path) |> Array.to_list
let trim line = (string line).Trim()
let to_upper line = (string line).ToUpper()
let new_list = [ for line in read_lines "myText.txt" -> line |> (trim >> to_upper) ]
printf "%A" new_list
Run Code Online (Sandbox Code Playgroud)