Snippets tagged reactive

  • Resource cleanup event combinator

    Declares an event combinator 'Event.using' that automatically releases resources allocated by a previous event occurence. Each event occurence creates a value using a function specified by the user and automatically calls 'Dispose' when generating a new value.

    2 people like this

    Posted: 12 years ago by Tomas Petricek

  • Building a WPF application in functional way

    I started to write pure F# + WPF application in about half a year ago. Today, I found a good way to compose WPF controls with dependent values. It's only writing a dependency object type as a class and give it to constructors of GUI controls. In this snippet "Volume","ColorVolume" and "ShapeContainer" has no properties. But works as a View which represents internal Model and allows users to change internal data. You only need calling a constructor of them. It means that you can compose GUI controls and it's functionality as a immutable data structure. (Update 2011/12/02 8:33:00(UTC+09:00) : Removed some user defined operators and renamed a type similar to DependencyObject in this snippet Reactor to SharedValue.) (Update 2011/12/02 9:04:01(UTC+09:00) : renamed some variables..)

    22 people like this

    Posted: 12 years ago by nagat01

  • Converting a Task to IObservable

    Helper Type Extension to convert a System.Threading.Tasks.Task to IObservable.

    1 people like this

    Posted: 8 years ago by Riccardo Terrell

  • Floating window over observables

    Creates an observable that returns windows of size 'n' (or smaller at the start) containing 'n' past values produced by observable 'source'. The order of items in the returned buffers is not guaranteed (it's a circular buffer).

    3 people like this

    Posted: 7 years ago by Tomas Petricek