Utils.Partition<T>(IEnumerable<T>, Func<T,Boolean>) Method

Definition

Partitions collection into the elements for which predicate returns true and those for which it returns false.

public static (System.Collections.Generic.List<T>, System.Collections.Generic.List<T>) Partition<T> (this System.Collections.Generic.IEnumerable<T> collection, Func<T,bool> predicate);
static member Partition : seq<'T> * Func<'T, bool> -> ValueTuple<System.Collections.Generic.List<'T>, System.Collections.Generic.List<'T>>
<Extension()>
Public Function Partition(Of T) (collection As IEnumerable(Of T), predicate As Func(Of T, Boolean)) As ValueTuple(Of List(Of T), List(Of T))

Type Parameters

T

Parameters

collection
IEnumerable<T>
predicate
Func<T,Boolean>

Returns

ValueTuple<List<T>,List<T>>

Applies to