Also, how do I display code on the forum without the darn smilies?? :-P

By on 3/16/2011 6:56 PM ()

The problem is your Combine() method. Check out

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
type AfterwordBuilder() =

    member this.Bind(x,rest) = rest();x()

    member this.Delay(f) = f()

    member this.Return(x) = x

    member this.Zero() = ()

    member this.For(e,f) = for x:int in e do f x

    //member this.Combine(a,b) = a();b

 

let afterward = new AfterwordBuilder()

 

do afterward {

    let counter = ref 0

    for xform in [1;2] do

        let n = !counter

        ()

    //()

    }

where it works, but uncommenting both comments causes the failure. See also

[link:msdn.microsoft.com]

and

[link:research.microsoft.com]

(6.3.10 Computation Expressions).

By on 3/16/2011 8:58 PM ()
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