Snippets tagged computation builder
Disposable computation builder
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.
27 people like this
Posted: 1 years ago by Tomas PetricekEnumerator computation builder
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.
25 people like this
Posted: 1 years ago by Tomas PetricekImperative computation builder
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.
6 people like this
Posted: 1 years ago by Tomas PetricekComputation Builder for Cartesian Products
Sample framework for computing Cartesian products using a computation builder.
7 people like this
Posted: 1 years ago by TechNeilogyLazyBuilder
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.
8 people like this
Posted: 10 months ago by zeclTiny IO Monad
Haskell-style IO in F#.
6 people like this
Posted: 10 months ago by igeta
Permutation and Combination
Permutation and Combination using ListBuilder.
8 people like this
Posted: 9 months ago by zeclClumsy LoopBuilder
Clumsy LoopBuilder.It's mischievous trick.
4 people like this
Posted: 8 months ago by zeclNon-deterministic computation builder
Computation builder for writing non-deterministic computations.
7 people like this
Posted: 6 months ago by Tomas PetricekDelimited Continuation Monad
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
3 people like this
Posted: 8 months ago by einblickerSimple builder example: Nullable
Simple Computational expressions / monad / builder -example, using .NET Nullable as demo.
3 people like this
Posted: 28 days ago by Tuomas Hietanen