F# Snippets

Recently added snippets

Popular snippets

  • Pipeline list processing

    An example showing how to process list in a pipeline. We first use List.filter to return only even numbers and then use List.map to format them as strings.

    81 people like this
    Posted: 3 years ago by Tomas Petricek

  • Hello world (F#)

    Classical "Hello world" example that prints a message to the console output. This version uses F# printfn function to do the printing.

    161 people like this
    Posted: 3 years ago by Tomas Petricek

  • Haskell function : iterate

    Implements iterate function from Haskell's Prelude. The function generates an infinite sequence by applying a function to the initial value (first) and then to the result of previous application.

    164 people like this
    Posted: 3 years ago by Nick Palladinos

  • 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: 2 years ago by Tao Liu

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

    94 people like this
    Posted: 3 years ago by Antonio Cisternino

  • Monadic Memoization

    Modular memoization within a pure functional setting that is implemented as a convenient computation builder.

    75 people like this
    Posted: 3 years ago by Nick Palladinos

Snippets by tags

Learning F# (15) math (28) Design Patterns (18) game (22) recursion (23) Async (66) DSL (21) SilverLight (21) list (39) lazy (17) Algorithms (21) string (14) fold (13) computation builder (13) F# (33) MailboxProcessor (20) Seq (42) lists (12) monad (18) parsing (20) tryfsharp (40) sequences (43) Collections (12) Sequence (28) tutorial (15) web (15) Kata (16) agent (16) reflection (18) WPF (15)
View all..

Snippets by authors

View all..

Database contains 1443 snippets out of which 1090 are public.