멤버 함수를 추출하여 F # 함수로 사용할 수 있습니까? 나는 다음과 같은 쓸 수 있도록하고 싶습니다 : 당신이 [하자] 경우F # : 멤버 함수를 언 바운드 함수로 사용하는 방법은 무엇입니까?
mystring |> string.Split '\n' |> Array.filter (string.Length >> (=) 0 >> not)
위의 코드는
let mystring = "a c\nb\n"
let stringSplit (y:char) (x:string) = x.Split(y)
let stringLength (x:string) = x.Length
mystring |> stringSplit '\n' |> Array.filter (stringLength >> (=) 0 >> not)