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.

    83 people like this

    Posted: 14 years ago by Dmitri Pavlenkov

  • 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

list (56) json (16) quotations (21) reflection (19) collections (16) staging (18) f# (43) tryfsharp (48) lists (15) async (98) lazy (20) math (35) mailboxprocessor (27) agent (20) recursion (33) html (16) sequences (48) parsing (28) monad (24) silverlight (22)

View all...

Database contains 3205 snippets out of which 1719 is public.