Recent snippets

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.

    127 people like this

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

    63 people like this

    Posted: 15 years ago by Ryan Riley

  • Adapter pattern

    Invoke the methods from incompatible types

    111 people like this

    Posted: 15 years ago by Tao Liu

Snippets by tags

monad (24) sequences (48) quotations (21) dsl (23) regex (17) parsing (28) reflection (19) design patterns (18) tryfsharp (48) http (18) collections (16) tutorial (17) mailboxprocessor (27) recursion (33) fold (22) kata (17) computation expression (15) learning f# (16) computation builder (17) pattern matching (15)

View all...

Database contains 3212 snippets out of which 1719 is public.