Computation builder that provides easy way of constructing IDisposable objects. It supports elegant composition of disposable objects using 'do!' which can be used for example when working with 'IObservable' type.
42 people like thisPosted: 13 years ago by Tomas Petricek
Defines an F# computation builder for encoding imperative computations. The 'return' construct returns immediately and terminates the rest of the computation. It is also possible to return value from a 'for' or 'while' loop.
11 people like thisPosted: 13 years ago by Tomas Petricek
I made LazyBuilder. The synthesis of the lazy function is troublesome. When the call of the Force() method increases, it is ugly. This solves the problem.
11 people like thisPosted: 13 years ago by zecl
Permutation and Combination using ListBuilder.
16 people like thisPosted: 13 years ago by zecl
Oleg's delimited continuation monad [1] and creating an external iterator from an internal iterator using it. [1] http://okmij.org/ftp/continuations/implementations.html#genuine-shift
6 people like thisPosted: 13 years ago by einblicker
Simple Computational expressions / monad / builder -example, using .NET Nullable as demo.
3 people like thisPosted: 12 years ago by Tuomas Hietanen
A simple computational expression to deal with asynchronous calls that return a choice type to signal failure.
Useful for calling remote services that may fail - you can call the remote service with functions of type "request -> Async
Posted: 10 years ago by mavnn
Fold it!
1 people like thisPosted: 2 years ago by Evgeniy Andreev
Stubbed methods for a computation expression with some explanations
7 people like thisPosted: 9 months ago by Jimmy Byrd
The snippet defines computation builder for working with IEnumerator. The bind operation (let!) reads next element from the enumerator, so the computation can be used for expressing things that cannot be written just using seq.
29 people like thisPosted: 13 years ago by Tomas Petricek
Sample framework for computing Cartesian products using a computation builder.
12 people like thisPosted: 13 years ago by TechNeilogy
Haskell-style IO in F#.
16 people like thisPosted: 13 years ago by igeta
Clumsy LoopBuilder.It's mischievous trick.
5 people like thisPosted: 13 years ago by zecl
Computation builder for writing non-deterministic computations.
8 people like thisPosted: 13 years ago by Tomas Petricek
This snippet defines a computation builder that sums the squares of float values. It includes Combine, Zero, Yield, Delay, and For operations.
2 people like thisPosted: 12 years ago by Joel Huang
Computation builder for async access.
1 people like thisPosted: 7 years ago by Zhukoff Dima
This snippet provides a builder for scope {...} computational workflow that returns a Scope object implementing System.IDisposable interface. All "use" bindings inside scope {...} workflow are kept from being disposed immediately when computation leaves scope. Instead, they are disposed only when resulting Scope object is disposed. This makes possible to access disposable outside the scope while it remains usable. This can be achieved by via return statement of workflow that can return, for example, a closure that encapsulates disposable. scope {...} return value is available through Value property of Scope object. Scopes may be nested through let! binding that means that nested scope will be disposed when the resulting scope is disposed.
3 people like thisPosted: 2 years ago by Crazy Monk