list
(
α
)
init (
(
int
α
)
 
f
, 
int
 
n)
Create a list of n elements from a function.
f
A function, which will provide the contents of the list.
n
The size of the result. If 0 or less, the result is empty.This function produces [f(0), f(1), ... , f(n - 1)].Note: This function does not guarantee in which order f(0), f(1), etc.
are called, so you should not use it if the order is important for the
behavior of your program. In such a case, use
List.init_stable (or List.rev_init).

Comments

The browser you use is not supported by this application, probably because it lacks some critical features.
For a better experience, please consider using this application with a supported browser.