Home » F# for downto do Example

F# for downto do Example

by Online Tutorials Library

F# For-Downto-Do Example

F# provides downto keyword to decrement identifier in loop. It decrements after each iteration. It is useful when you want to decrement.

Let’s see an example.

Output:

10 9 8 7 6 5 4 3 2 1 

F# For-In-Do Loop Example

F# provides for-in-do loop which allows iterating data collections like: list, set, sequence, array etc.

Output:

Next TopicF# while loop

You may also like