相关疑难解决方法(0)

在F#中,>>运算符是什么意思?

我在这个示例中的一些代码中注意到包含>>运算符:

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)

f# operators

33
推荐指数
3
解决办法
1万
查看次数

标签 统计

f# ×1

operators ×1