Recent snippets

Popular snippets

  • Split a list

    Three ways to split a list in half (but not necessarily in the middle). A forth version added that's very short and should be fast, as we only use List.fold. New champ found.

    84 people like this

    Posted: 14 years ago by Dmitri Pavlenkov

  • A beautiful fixed-point finding function

    We start with an initial value and then applying f repeatedly, until the value does not change anymore.

    303 people like this

    Posted: 15 years ago by Nick Palladinos

  • 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

Snippets by tags

lists (15) agent (20) tryfsharp (48) quotations (21) lazy (20) game (32) generic programming (17) recursion (33) staging (18) kata (17) fold (22) dsl (23) math (35) collections (16) sequence (32) learning f# (16) monad (24) array (22) sequences (48) mailboxprocessor (27)

View all...

Database contains 3208 snippets out of which 1719 is public.