QueryBuilder.TakeWhile<'T,'Q> Method (F#)
A query operator that selects elements from a sequence as long as a specified condition is true, and then skips the remaining elements.
Namespace/Module Path: Microsoft.FSharp.Linq
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature:
member this.TakeWhile : QuerySource<'T,'Q> * ('T -> bool) -> QuerySource<'T,'Q>
// Usage:
queryBuilder.TakeWhile (source, predicate)
Parameters
source
Type: QuerySource<'T,'Q>The input query.
predicate
Type: 'T -> boolA Boolean function to test elements.
Return Value
The truncated query.
Remarks
For more information and examples, see Query Expressions (F#).
Platforms
Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2
Version Information
F# Core Library Versions
Supported in: 4.0, Portable