Recent snippets

Popular snippets

  • Hello world (F#)

    Classical "Hello world" example that prints a message to the console output. This version uses F# printfn function to do the printing.

    185 people like this

    Posted: 13 years ago by Tomas Petricek

  • 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

  • Partition a sequence until a predicate is satiated

    This function is given a partition predicate and a sequence. Until the predicate returns false, a list will be filled with elements. When it is, both the list and the remainder of the sequence will be returned. Note that this example preserves the laziness of the unchecked sequence elements.

    69 people like this

    Posted: 13 years ago by Rick Minerich

Snippets by tags

list (56) staging (18) tryfsharp (48) computation expression (15) quotations (21) kata (17) tutorial (17) html (16) math (35) game (32) async (98) reflection (19) collections (16) pattern matching (15) mailboxprocessor (27) recursion (33) array (22) http (18) string (28) algorithms (26)

View all...

Database contains 3195 snippets out of which 1711 is public.