Recent snippets

Popular snippets

  • Adapter pattern

    Invoke the methods from incompatible types

    110 people like this

    Posted: 12 years ago by Tao Liu

  • WPF / SilverLight Converter II

    version 1 is This new version support convert from any existing function to a converter function by using composition and pipeline. The convert function is to make the function signature agree to the IValueConverter interface. You can add new functions in the FunctionLibrary module and reuse the class definition to reduce the coding effort. The first sample is to show how to make the converter pipeline work, the second one is a debugger converter used to debug the data binding problem.

    90 people like this

    Posted: 12 years ago by Tao Liu

  • Chain of responsibility II

    Unlike the previous chain of responsibility, this version use the pipeline to chain responsibilities.

    104 people like this

    Posted: 12 years ago by Tao Liu

  • Break sequence into n-element subsequences

    I'm working on parallel computations and I thought it would be useful to break work into chunks, especially when processing each element asynchronously is too expensive. The neat thing is that this function is general even though motivation for it is specific. Another neat thing is that this is true lazy sequence unlike what you'd get if you used Seq.groupBy. There are three versions for your enjoyment.

    73 people like this

    Posted: 13 years ago by Dmitri Pavlenkov

  • Haskell function : iterate

    Implements iterate function from Haskell's Prelude. The function generates an infinite sequence by applying a function to the initial value (first) and then to the result of previous application.

    203 people like this

    Posted: 13 years ago by Nick Palladinos

  • Load XAML

    This example shows how to load a Xaml file allowing to use WPF from F#. It also shows how to access WPF objects and register event handlers.

    109 people like this

    Posted: 13 years ago by Antonio Cisternino

Snippets by tags

computation builder (17) game (32) reflection (19) quotations (21) mailboxprocessor (27) array (22) dsl (23) monad (24) sequence (32) f# (43) computation expression (15) regex (17) design patterns (18) fparsec (15) recursion (33) html (15) tutorial (17) parsing (28) pattern matching (15) agent (20)

View all...

Database contains 3190 snippets out of which 1710 is public.