F# Snippets

Recently added 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.

    114 people like this
    Posted: 4 years ago by Alex Muscar

  • Chain of responsibility II

    Unlike the previous chain of responsibility, this version use the pipeline to chain responsibilities.

    97 people like this
    Posted: 4 years ago by Tao Liu

  • Asynchronous sequences

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

    101 people like this
    Posted: 4 years ago by Tomas Petricek

  • WPF / SilverLight Converter II

    version 1 is http://fssnip.net/62. This new version support convert from any existing function to a converter function by using composition and pipeline. The convert function is to make the function signature agree to the IValueConverter interface. You can add new functions in the FunctionLibrary module and reuse the class definition to reduce the coding effort. The first sample is to show how to make the converter pipeline work, the second one is a debugger converter used to debug the data binding problem.

    83 people like this
    Posted: 4 years ago by Tao Liu

  • Exploring Population Data

    Learn Key Principle of F# in just a few minutes with the following Sample of "World Bank Type Provider - Exploring Population Data"

    370 people like this
    Posted: 1 years ago by Muhammad Mugees Asif

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

    102 people like this
    Posted: 4 years ago by Antonio Cisternino

Snippets by tags

SilverLight (21) fold (16) sequences (44) reflection (18) Collections (16) list (46) string (16) array (13) Algorithms (24) Design Patterns (18) DSL (22) async (85) agent (19) recursion (24) Seq (44) Kata (16) parsing (22) monad (20) WPF (16) tryfsharp (46) Learning F# (16) Sequence (28) quotations (15) game (29) web (19) tutorial (15) math (30) lazy (17) MailboxProcessor (24) f# (40)
View all..

Snippets by authors

View all..

Database contains 1743 snippets out of which 1282 are public.