F# Snippets

Recently added snippets

  • Two Logicians

    Solves the "Two Logicians" puzzle.

    Posted: 15 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: 22 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

  • 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

  • Get Stock Quote Data and Historical Stock Prices from Yahoo Finance

    Get Stock Quote Data and Historical Stock Prices from Yahoo Finance.

    217 people like this
    Posted: 3 years ago by Tuomas Hietanen

  • 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

  • Chain of responsibility II

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

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

  • 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

  • NUnit Sugar

    Some simple functions for writing more idiomatic F# tests with NUnit.

    77 people like this
    Posted: 3 years ago by Ryan Riley

Snippets by tags

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

Snippets by authors

View all..

Database contains 1486 snippets out of which 1111 are public.