Creates a sequence obtained by applying a given function over a range of integer values starting at 0.
Namespace: SequencesAssembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax public static ISequence<T> Tabulate<T>(
int length,
Func<int, T> func
)
public static ISequence<T> Tabulate<T>(
int length,
Func<int, T> func
)
Public Shared Function Tabulate(Of T) (
length As Integer,
func As Func(Of Integer, T)
) As ISequence(Of T)
Public Shared Function Tabulate(Of T) (
length As Integer,
func As Func(Of Integer, T)
) As ISequence(Of T)
public:
generic<typename T>
static ISequence<T>^ Tabulate(
int length,
Func<int, T>^ func
)
public:
generic<typename T>
static ISequence<T>^ Tabulate(
int length,
Func<int, T>^ func
)
static member Tabulate :
length : int *
func : Func<int, 'T> -> ISequence<'T>
static member Tabulate :
length : int *
func : Func<int, 'T> -> ISequence<'T>
Parameters
- length
- Type: System Int32
The number of elements in the collection.
- func
- Type: System Func Int32, T
The function used to produce the elements.
Type Parameters - T
- The type of the elements in the sequence.
Return Value
Type:
ISequence T A sequence obtained by applying
func over a range of integer values from 0 to
length - 1.
See Also