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

  • ObservableObject

    The ObservableObject type implements the INotifyPropertyChanged interface used in WPF and Silverlight to notify on changes to properties that are bound to a control. Specify property names type safely using F# Quotations, i.e. <@ this.PropertyName @> when invoking the NotifyPropertyChanged method. If you are following the MVVM pattern then your View Model class can inherit from the ObservableObject type.

    67 people like this

    Posted: 14 years ago by Phillip Trelford

  • 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.

    77 people like this

    Posted: 14 years ago by Tomas Petricek

Snippets by tags

dsl (23) pattern matching (15) regex (17) mailboxprocessor (27) lists (15) computation builder (17) monad (24) generic programming (17) design patterns (18) silverlight (22) tutorial (17) async (98) sequences (48) f# (43) html (16) kata (17) recursion (33) computation expression (15) wpf (20) seq (54)

View all...

Database contains 3205 snippets out of which 1719 is public.