| GenExtensionsRetryUntilT Method |
Create a generator that calls gen repeatedly until
the given condition is fulfilled. The generated value is then
returned. Use this combinator with care, since it may result
in infinite loops.
Namespace: FsCheckUtilsAssembly: FsCheckUtils (in FsCheckUtils.dll) Version: 1.0.1.0 (1.0.1.0)
Syntaxpublic static Gen<T> RetryUntil<T>(
this Gen<T> gen,
Func<T, bool> p
)
<ExtensionAttribute>
Public Shared Function RetryUntil(Of T) (
gen As Gen(Of T),
p As Func(Of T, Boolean)
) As Gen(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static Gen<T>^ RetryUntil(
Gen<T>^ gen,
Func<T, bool>^ p
)
[<ExtensionAttribute>]
static member RetryUntil :
gen : Gen<'T> *
p : Func<'T, bool> -> Gen<'T>
Parameters
- gen
- Type: GenT
The generator. - p
- Type: SystemFuncT, Boolean
The condition to be fulfilled.
Type Parameters
- T
- The type of elements generated by gen.
Return Value
Type:
GenTA generator that calls
gen repeatedly until
the given condition is fulfilled.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
GenT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also