Recent snippets

Popular snippets

  • NUnit Sugar

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

    91 people like this

    Posted: 15 years ago by Ryan Riley

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

    109 people like this

    Posted: 15 years ago by Antonio Cisternino

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

  • Strategy pattern

    Strategy pattern in F#

    83 people like this

    Posted: 14 years ago by Tao Liu

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

    124 people like this

    Posted: 14 years ago by Blake Coverett

  • Composable WCF Web API using Async

    A functional wrapper around the new WCF Web APIs (http://wcf.codeplex.com/). Composition is achieved through the use of the HttpRequestMessage -> Async signature. Pushing the app calls in the MessageHandler intercepts all requests and allows you to take control at the earliest point possible before operation selection occurs. Extending this slightly to call the innerChannel's SendAsync would allow you to create a middleware layer that would work both with this and other, normal Web API services.

    57 people like this

    Posted: 14 years ago by Ryan Riley

Snippets by tags

fold (22) reflection (19) tryfsharp (48) computation expression (15) wpf (20) array (22) parsing (28) dsl (23) lazy (20) mailboxprocessor (27) algorithms (26) tutorial (17) html (16) lists (15) kata (17) regex (17) agent (20) learning f# (16) game (32) list (56)

View all...

Database contains 3206 snippets out of which 1719 is public.