Recent snippets

Popular snippets

  • Composing a list of functions

    Composition of functions in F# is easily achieved by using the >> operator. You can also chain an arbitary amount of functions (represented as a list or sequence) together by folding the list/seq with >>. [More formally: the set of endomorphisms 'a -> 'a forms a monoid with the binary, associative operator ">>" (or "<<") and the neutral element "id".]

    87 people like this

    Posted: 15 years ago by Novox

  • 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

  • get the list of LAN Sql servers

    get the list of ethernet sql servers

    90 people like this

    Posted: 14 years ago by nCdy

  • 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: 14 years ago by Tomas Petricek

  • WPF / SilverLight Converter II

    version 1 is http://fssnip.net/62. This new version support convert from any existing function to a converter function by using composition and pipeline. The convert function is to make the function signature agree to the IValueConverter interface. You can add new functions in the FunctionLibrary module and reuse the class definition to reduce the coding effort. The first sample is to show how to make the converter pipeline work, the second one is a debugger converter used to debug the data binding problem.

    90 people like this

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

    185 people like this

    Posted: 15 years ago by Tomas Petricek

Snippets by tags

kata (17) design patterns (18) json (16) regex (17) lists (15) tryfsharp (48) mailboxprocessor (27) html (16) recursion (33) dsl (23) generic programming (17) http (18) sequence (32) game (32) async (98) silverlight (22) parsing (28) tutorial (17) algorithms (26) monad (24)

View all...

Database contains 3207 snippets out of which 1719 is public.