Recent snippets

Popular snippets

  • Chain of responsibility

    The following sample wants to make sure the person’s age is between 18 and 65, weight is no more than 200 and tall enough (>120).

    85 people like this

    Posted: 14 years ago by Tao Liu

  • 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

  • The Haskell const function

    The const function is simple, but you can use it to make your code more legible. In this example we convert a unary function to a function of arity 2 (that ignores the second argument). Also by using the flip function from Haskell (which is equally easy to define) you can ignore the first argument.

    119 people like this

    Posted: 15 years ago by Alex Muscar

Snippets by tags

html (16) sequence (32) recursion (33) string (29) learning f# (16) wpf (20) silverlight (22) mailboxprocessor (27) web (29) f# (43) lists (15) json (16) monad (24) dsl (23) agent (20) tutorial (17) generic programming (17) quotations (21) tryfsharp (48) parsing (28)

View all...

Database contains 3208 snippets out of which 1719 is public.