Recent snippets

Popular snippets

  • Units of Measure

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

    75 people like this

    Posted: 10 years ago by Robert Pickering

  • Continuation-Passing Mnemonics

    Continuations provide a means whereby heap space can be traded for stack depth (heap space being generally more plentiful than stack depth). They are especially useful where tail recursion is not possible. Here are a couple of simple continuation examples that can be extended to cover more complex scenarios.

    89 people like this

    Posted: 9 years ago by Neil Carrier

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

    59 people like this

    Posted: 9 years ago by Phillip Trelford

  • Struct Tuple

    Two/Three/Four-element generic tuples implemented as a value types for writing more efficient F# code.

    59 people like this

    Posted: 9 years ago by fholm

  • Dynamic operator using Reflection

    Demonstrates how to implement the dynamic operator (?) using .NET Reflection. The implementation supports calling constructors, propreties and methods using simple overload resolution (based on parameter count). It handles instance as well as static members.

    66 people like this

    Posted: 9 years ago by Tomas Petricek

  • 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: 9 years ago by Nick Palladinos

Snippets by tags

dsl (23) sequences (47) async (96) game (31) generic programming (17) collections (16) sequence (32) http (17) tutorial (17) pattern matching (14) reflection (19) monad (22) string (25) design patterns (18) tryfsharp (48) web (28) learning f# (16) algorithms (25) parsing (26) wpf (20)

View all...

Database contains 2542 snippets out of which 1646 is public.