Recent snippets

Popular snippets

  • Factory Pattern

    Factory pattern in F#

    81 people like this

    Posted: 14 years ago by Tao Liu

  • 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

  • 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

Snippets by tags

sequences (48) regex (17) string (29) lazy (20) collections (16) agent (20) wpf (20) tutorial (17) mailboxprocessor (27) monad (24) game (32) array (22) lists (15) json (16) list (56) generic programming (17) async (98) html (16) http (18) tryfsharp (48)

View all...

Database contains 3206 snippets out of which 1719 is public.