It's just a small error - you should make count a function, at the moment it is a value so bind only happens once. I think what you meant to right is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#light 
let mutable theCount = 0 
let count() =   
    theCount <- theCount + 1  
    theCount
     
let Test1 =   
    count() = 1   
let Test2 =   
    count() = 2   
let Test3 =   
    count() = 3 

print_any [Test1; Test2; Test3]

Cheers,
Rob

By on 8/12/2007 3:46 AM ()
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