Recent snippets

Popular snippets

  • 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.

    75 people like this

    Posted: 15 years ago by Tomas Petricek

  • Dynamic operator using Reflection

    Demonstrates how to implement the dynamic operator (?) using .NET Reflection. The implementation supports calling constructors, propreties and methods using simple overload resolution (based on parameter count). It handles instance as well as static members.

    74 people like this

    Posted: 15 years ago by Tomas Petricek

  • Asynchronous sequences

    An asynchronous sequence is similar to the seq type, but the elements of the sequence are generated asynchronously without blocking the caller as in Async. This snippet declares asynchronous sequence and uses it to compare two files in 1k blocks.

    109 people like this

    Posted: 15 years ago by Tomas Petricek

Snippets by tags

pattern matching (15) game (32) monad (24) lists (15) seq (54) computation builder (17) mailboxprocessor (27) html (16) tryfsharp (48) staging (18) recursion (33) kata (17) reflection (19) math (35) learning f# (16) json (16) silverlight (22) parsing (28) design patterns (18) array (22)

View all...

Database contains 3209 snippets out of which 1719 is public.