Recent snippets

Popular snippets

  • 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

  • A beautiful fixed-point finding function

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

    302 people like this

    Posted: 15 years ago by Nick Palladinos

  • Break sequence into n-element subsequences

    I'm working on parallel computations and I thought it would be useful to break work into chunks, especially when processing each element asynchronously is too expensive. The neat thing is that this function is general even though motivation for it is specific. Another neat thing is that this is true lazy sequence unlike what you'd get if you used Seq.groupBy. There are three versions for your enjoyment.

    73 people like this

    Posted: 15 years ago by Dmitri Pavlenkov

Snippets by tags

generic programming (17) silverlight (22) game (32) seq (54) regex (17) kata (17) fold (22) pattern matching (15) sequence (32) f# (43) html (16) tutorial (17) computation builder (17) json (16) mailboxprocessor (27) monad (24) web (29) http (18) array (22) sequences (48)

View all...

Database contains 3207 snippets out of which 1719 is public.