Recent snippets

Popular snippets

  • Filtering lists

    Two functions showing how to filter functional lists using the specified predicate. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter.

    75 people like this

    Posted: 13 years ago by Tomas Petricek

  • WPF / SilverLight Converter II

    version 1 is http://fssnip.net/62. This new version support convert from any existing function to a converter function by using composition and pipeline. The convert function is to make the function signature agree to the IValueConverter interface. You can add new functions in the FunctionLibrary module and reuse the class definition to reduce the coding effort. The first sample is to show how to make the converter pipeline work, the second one is a debugger converter used to debug the data binding problem.

    90 people like this

    Posted: 12 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: 13 years ago by Ryan Riley

Snippets by tags

tryfsharp (48) string (27) generic programming (17) f# (43) list (56) regex (17) json (15) math (35) dsl (23) parsing (28) monad (24) reflection (19) sequence (32) agent (20) algorithms (26) kata (17) html (15) fold (22) collections (16) staging (18)

View all...

Database contains 3190 snippets out of which 1710 is public.