F# Snippets

Recently added snippets

  • Mass shootings in the US

    Based on the article "We’re now averaging more than one mass shooting per day in 2015", this calculates when is the best time to go to US to avoid being shot.

    Posted: 4 days ago by Tomas Petricek

  • GrahamScan.fsx

    Function to perform the Graham scan algorithm which looks for the set of points forming the convex hull of the input points

    Posted: 9 days ago by albertp007

  • ReadWavFile.fsx

    Function to read a wav file

    Posted: 9 days ago by albertp007

  • Rx Web Server Demo

    Barebone Reactive Extensions web server demo.

    Posted: 12 days ago by Giacomo Stelluti Scala

  • Flappy bird with sequence expressions

    This is a somewhat sensible solution to the flappy bird dojo by Phil Trelford. It uses sequence expressions eliminate some mutation of the flappy bird. To play this sample on Windows simply copy the code from the raw view and execute in F# interactive, for cross platform implementations check out: http://trelford.com/prognet15.zip

    Posted: 17 days ago by Tomas Petricek

  • Flappy bird with the flappy monad

    This is a crazy solution to the flappy bird dojo by Phil Trelford. It defines a custom computation builder to eliminate all mutation of the flappy bird. The script uses WPF and is playable on Windows in F# interactive, just copy the raw version, and for cross-platform implementations download: http://trelford.com/prognet15.zip

    Posted: 17 days ago by Tomas Petricek

Popular snippets

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

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

  • 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

  • get the list of LAN Sql servers

    get the list of ethernet sql servers

    86 people like this
    Posted: 4 years ago by nCdy

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

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

  • Monadic Memoization

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

    83 people like this
    Posted: 4 years ago by Nick Palladinos

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

    194 people like this
    Posted: 4 years ago by Nick Palladinos

Snippets by tags

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

Snippets by authors

View all..

Database contains 1712 snippets out of which 1260 are public.