Recent snippets

Popular snippets

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

    87 people like this

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

    183 people like this

    Posted: 10 years ago by Tomas Petricek

  • Adapter pattern

    Invoke the methods from incompatible types

    108 people like this

    Posted: 9 years ago by Tao Liu

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

    87 people like this

    Posted: 9 years ago by Tao Liu

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

    79 people like this

    Posted: 10 years ago by Tomas Petricek

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

    120 people like this

    Posted: 10 years ago by Blake Coverett

Snippets by tags

monad (22) lists (14) silverlight (22) fold (21) computation builder (14) recursion (32) math (35) staging (18) seq (54) parsing (26) html (15) array (22) algorithms (25) pattern matching (14) reflection (19) web (29) game (32) generic programming (17) json (14) sequences (47)

View all...

Database contains 2798 snippets out of which 1663 is public.