F# Snippets

Recently added snippets

  • Cross Join Lists

    Given a list of lists, the function crossJoin outputs all combination of elements from the inner lists, i.e. each combination is a list which contains elements from each of the inner lists in the input. Note: Order is not preserved

    Posted: 17 hours ago by Faisal Waris

  • Trigroup

    Trigroup

    Posted: yesterday by Pitch Rock

  • Helpers for formatting dates and strings

    Simplistic helpers for formatting dates and strings in a web server (strip HTML tags when reading RSS feeds, nicely format dates etc.)

    Posted: 7 days ago by Tomas Petricek

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.

    98 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: 3 years ago by Tao Liu

  • Minimal XML DSL

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

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

  • Read only ref

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

    79 people like this
    Posted: 4 years ago by fholm

  • Adapter pattern

    Invoke the methods from incompatible types

    94 people like this
    Posted: 3 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.

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

Snippets by tags

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

Snippets by authors

View all..

Database contains 1639 snippets out of which 1206 are public.