2017-11-25 3 views

답변

4

이것은 테스트 케이스를 통과하는 가장 간단한 함수입니다.

let split (str:string) = 
    str.Split ':' 
    |> Seq.collect(fun x -> [":"; x.Trim()]) 
    |> Seq.tail 
    |> Seq.toList 

split "hello world : bye world" // ["hello world"; ":"; "bye world"] 
관련 문제