F# Snippets

Recently added snippets

  • Install Fsx script as a windows service

    Just download nssm at http://www.nssm.cc/download then install the HttpEcho.fsx script as a service: nssm.exe install HttpEcho 'C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\FsiAnyCPU.exe' --exec c:/HttpEcho.fsx Now you're done. Off course you can install any fsx script as a service this way :D

    Posted: 10 days ago by thinkbeforecoding

  • Receive-only SMTP server

    An agent is used to act as SMTP server and receive emails. Another agent receives emails from the SMTP server and also responds to requests for all emails received. A type is exposed that wraps this behaviour in a single method to get the list of emails.

    Posted: 10 days ago by Nick Lydon

  • Chart NuGet package downloads

    Quick script using FsLab that visualizes the aggregate number of downloads of a NuGet package over time, using the HTML type provider to get the data from www.nuget.org.

    Posted: 12 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.

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

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

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

  • Minimal XML DSL

    This snippet provides a very small internal DSL for creating and querying XML using the underlying XLinq classes.

    353 people like this
    Posted: 4 years ago by Blake Coverett

  • 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

  • Continuation-Passing Mnemonics

    Continuations provide a means whereby heap space can be traded for stack depth (heap space being generally more plentiful than stack depth). They are especially useful where tail recursion is not possible. Here are a couple of simple continuation examples that can be extended to cover more complex scenarios.

    88 people like this
    Posted: 4 years ago by Neil Carrier

  • 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

Snippets by tags

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

Snippets by authors

View all..

Database contains 1787 snippets out of which 1309 are public.