Recent snippets

Popular snippets

  • Association list lookup

    While prototyping programs I find myself using association lists. This little snippet defines a lookup functions for association lists defined as lists of tuples.

    68 people like this

    Posted: 15 years ago by Alex Muscar

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

    69 people like this

    Posted: 15 years ago by Phillip Trelford

  • Asynchronous sequences

    An asynchronous sequence is similar to the seq type, but the elements of the sequence are generated asynchronously without blocking the caller as in Async. This snippet declares asynchronous sequence and uses it to compare two files in 1k blocks.

    109 people like this

    Posted: 15 years ago by Tomas Petricek

  • Exploring Population Data

    Learn Key Principle of F# in just a few minutes with the following Sample of "World Bank Type Provider - Exploring Population Data"

    383 people like this

    Posted: 12 years ago by Muhammad Mugees Asif

  • Units of Measure

    Show's how to define units of measure to add stronger typing to your numerical functions.

    75 people like this

    Posted: 15 years ago by Robert Pickering

  • FSX Structure

    I use this basic template when writing .fsx files that I might want to compile. It adjusts the difference in command line/entrypoint handling between a script and a compiled assembly. This example shows the details for a WPF script — replace the #r's and/or remove the STAThread for a WinForms or Console script.

    127 people like this

    Posted: 15 years ago by Blake Coverett

Snippets by tags

lazy (20) tryfsharp (48) wpf (20) html (16) silverlight (22) collections (16) math (35) staging (18) http (18) async (98) pattern matching (15) design patterns (18) sequences (48) array (22) list (56) learning f# (16) mailboxprocessor (27) lists (15) game (32) agent (20)

View all...

Database contains 3208 snippets out of which 1719 is public.