You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 4, 2024. It is now read-only.
let``Extend and continue work using computation expression``()=letw1= work {let!x= makeValue 1|> name "one"let!y= inc x
let!z= inc x
let!w= add(x,y)|> name "sum"()}leteng,names,annotations,_ = startFrom_x w1 (createDefaultSuffix)letwrk= Execution.EngineAPI.AwaitCompletion eng |> Async.RunSynchronously
eng.Dispose()
Trace.WriteLine("\n\n\nContinues...")letsnapshot= wrk, names, annotations
letw2= work {let!y= snapshot |> take<int>"out one"let!w= snapshot |> take<int>"out sum"let!z= inc y
return z
}let(g,_,_)= build w2
Assert.AreEqual(4, g.Structure.Vertices.Count)match eval w2 |> Async.RunSynchronously with| EvaluationResult.Failed _-> failwith "Work failed"| EvaluationResult.Success z ->
z =?3