Hide this comment

There's no 'continue' keyword, so you just express the control flow directly using if-then-else. For example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
 

let s = seq [ 1..10 ]
let e = s.GetEnumerator()
while e.MoveNext() do
    let x = e.Current 
    printfn "%d" x
    // skip evens
    if x % 2 = 0 then
        () // continue
    else
        printfn "square is %d" (x*x)

(Some people may also be interested in [link:tomasp.net] )

By on 12/5/2009 12:58 PM ()Reply
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper

Logging in...