Recent snippets

Popular snippets

  • 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: 14 years ago by Alex Muscar

  • 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

  • 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

Snippets by tags

fold (22) web (29) sequences (48) array (22) agent (20) computation builder (17) list (56) f# (43) computation expression (15) json (16) mailboxprocessor (27) async (98) pattern matching (15) tryfsharp (48) kata (17) parsing (28) recursion (33) html (16) quotations (21) dsl (23)

View all...

Database contains 3206 snippets out of which 1719 is public.