Recent snippets

Popular snippets

  • 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

  • Filtering lists

    Two functions showing how to filter functional lists using the specified predicate. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter.

    77 people like this

    Posted: 15 years ago by Tomas Petricek

  • Active pattern for let binding inside patterns

    The Let active pattern demonstrated by this snippet can be used to assign values to symbols in pattern matching. This is useful for writing complex pattern matching using match as we can handle multiple cases using a single clause.

    64 people like this

    Posted: 15 years ago by Tomas Petricek

Snippets by tags

math (35) seq (54) design patterns (18) learning f# (16) collections (16) f# (43) async (98) monad (24) computation expression (15) recursion (33) string (29) http (18) regex (17) tutorial (17) silverlight (22) reflection (19) dsl (23) pattern matching (15) wpf (20) computation builder (17)

View all...

Database contains 3208 snippets out of which 1719 is public.