Recent snippets

Popular snippets

  • Wicked way to solve quadratic equation using list of operators

    This is to demonstrate that: (1) there are many ways to solve the same problems; (2) operators can be grouped together into data structures and act as data; (3) you can have fun in F# in many ways.

    57 people like this

    Posted: 13 years ago by Dmitry Soshnikov

  • Adapter pattern

    Invoke the methods from incompatible types

    110 people like this

    Posted: 13 years ago by Tao Liu

  • 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: 13 years ago by Phillip Trelford

  • Largest Palindrome Number from Product of Two Three Digit Numbers

    Here is an improved version twice shorter, than original

    72 people like this

    Posted: 14 years ago by Nick Canzoneri

  • 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

  • Haskell function : iterate

    Implements iterate function from Haskell's Prelude. The function generates an infinite sequence by applying a function to the initial value (first) and then to the result of previous application.

    203 people like this

    Posted: 14 years ago by Nick Palladinos

Snippets by tags

dsl (23) quotations (21) f# (43) sequences (48) agent (20) learning f# (16) recursion (33) design patterns (18) list (56) web (29) string (29) math (35) array (22) mailboxprocessor (27) parsing (28) lazy (20) html (16) tutorial (17) http (18) seq (54)

View all...

Database contains 3198 snippets out of which 1713 is public.