共用方式為


Parallel.partition<'T> 函式 (F#)

分割成包含項目,其指定的述詞傳回 true和 false,分別 的兩個集合的集合

命名空間/模組路徑:Microsoft.FSharp.Collections.ArrayModule.Parallel

組件:FSharp.Core (在 FSharp.Core.dll 中)

// Signature:
partition : ('T -> bool) -> 'T [] -> 'T [] * 'T []

// Usage:
partition predicate array

參數

  • predicate
    型別:'T -> bool

    用來測試輸入項目的函式。

  • array
    型別:'T []

    輸入陣列。

傳回值

兩個集合中。

備註

使用 平行執行作業 [O:System.Threading.Tasks.Parallel.For] 未指定索引來套用特定的函式順序。

這個函式是名為 Partition中 已編譯的組件。 如果從一個語言,F # 以外,或透過反映存取函式使用這個名稱。

平台

Windows 7、Windows Vista SP2、Windows XP SP3、Windows XP x64 SP2、Windows Server 2008 R2、Windows Server 2008 SP2、Windows Server 2003 SP2

版本資訊

F# 執行階段

支援版本:4.0

Silverlight

不支援

請參閱

參考

Collections.Array 模組 (F#)

其他資源

Array.Parallel 模組 (F#)