F# Snippets

Recently added snippets

  • Two Logicians

    Solves the "Two Logicians" puzzle.

    Posted: 12 days ago by Vandroiy

  • Similar string Markov chain

    Generates strings that are similar to the input, as measured by the probability of a symbol depending on preceding symbols. (Markov chain) The order, which defines how many preceding symbols to look at before placing another, is variable.

    Posted: 19 days ago by Vandroiy

  • Lock-free, mutable list

    Lock-free, mutable list that supports multi-threading scenarios.

    Posted: 1 months ago by Ruxo Zheng

Popular snippets

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

    367 people like this
    Posted: 10 months ago by Muhammad Mugees Asif

  • FSX Structure

    I use this basic template when writing .fsx files that I might want to compile. It adjusts the difference in command line/entrypoint handling between a script and a compiled assembly. This example shows the details for a WPF script — replace the #r's and/or remove the STAThread for a WinForms or Console script.

    94 people like this
    Posted: 3 years ago by Blake Coverett

  • 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

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

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

  • Adapter pattern

    Invoke the methods from incompatible types

    94 people like this
    Posted: 3 years ago by Tao Liu

  • Read only ref

    F# implementation of RO_ref from the "Effective ML" talk.

    79 people like this
    Posted: 3 years ago by fholm

Snippets by tags

Design Patterns (18) computation builder (13) reflection (18) string (15) F# (33) WPF (15) DSL (21) MailboxProcessor (21) Learning F# (15) sequences (43) agent (18) Kata (16) list (40) async (69) Sequence (28) lists (13) parsing (21) lazy (17) monad (18) Seq (42) recursion (24) tutorial (15) SilverLight (21) math (28) Algorithms (21) game (22) tryfsharp (41) collections (13) fold (13) web (15)
View all..

Snippets by authors

View all..

Database contains 1486 snippets out of which 1111 are public.