Recent snippets

Popular snippets

  • Association list lookup

    While prototyping programs I find myself using association lists. This little snippet defines a lookup functions for association lists defined as lists of tuples.

    68 people like this

    Posted: 15 years ago by Alex Muscar

  • NUnit Sugar

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

    91 people like this

    Posted: 15 years ago by Ryan Riley

  • Asynchronous sequences

    An asynchronous sequence is similar to the seq type, but the elements of the sequence are generated asynchronously without blocking the caller as in Async. This snippet declares asynchronous sequence and uses it to compare two files in 1k blocks.

    109 people like this

    Posted: 15 years ago by Tomas Petricek

  • Filtering lists

    Two functions showing how to filter functional lists using the specified predicate. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter.

    77 people like this

    Posted: 16 years ago by Tomas Petricek

  • Struct Tuple

    Two/Three/Four-element generic tuples implemented as a value types for writing more efficient F# code.

    77 people like this

    Posted: 15 years ago by fholm

  • Creating objects with events

    This snippet shows how to create objects with events in F#. It shows both simple event (to be used from F#) and a .NET compatible event with specific delegate type.

    85 people like this

    Posted: 15 years ago by Tomas Petricek

Snippets by tags

math (35) list (56) quotations (21) tutorial (17) fold (22) sequence (32) json (16) string (29) algorithms (25) monad (24) mailboxprocessor (27) dsl (23) agent (20) f# (43) http (18) collections (16) recursion (33) design patterns (18) silverlight (22) learning f# (16)

View all...

Database contains 3212 snippets out of which 1719 is public.