Recent snippets

Popular snippets

  • Factory Pattern

    Factory pattern in F#

    81 people like this

    Posted: 14 years ago by Tao Liu

  • 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: 15 years ago by Antonio Cisternino

  • Projecting lists

    Three functions showing how to implement projection for functional lists. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter. The third version extends this with continuation passing.

    74 people like this

    Posted: 15 years ago by Tomas Petricek

  • Strategy pattern

    Strategy pattern in F#

    83 people like this

    Posted: 14 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: 15 years ago by Dmitri Pavlenkov

  • Projecting lists

    Three functions showing how to implement projection for functional lists. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter. The third version extends this with continuation passing.

    74 people like this

    Posted: 15 years ago by Tomas Petricek

Snippets by tags

reflection (19) sequence (32) computation expression (15) computation builder (17) monad (24) generic programming (17) json (16) list (56) design patterns (18) string (29) tryfsharp (48) lazy (20) sequences (48) staging (18) algorithms (26) recursion (33) mailboxprocessor (27) dsl (23) kata (17) lists (15)

View all...

Database contains 3207 snippets out of which 1719 is public.