Recent snippets

Popular snippets

  • Minimal XML DSL

    This snippet provides a very small internal DSL for creating and querying XML using the underlying XLinq classes.

    374 people like this

    Posted: 15 years ago by Blake Coverett

  • 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

  • Read only ref

    F# implementation of RO_ref from the "Effective ML" talk.

    92 people like this

    Posted: 14 years ago by fholm

  • Composing a list of functions

    Composition of functions in F# is easily achieved by using the >> operator. You can also chain an arbitary amount of functions (represented as a list or sequence) together by folding the list/seq with >>. [More formally: the set of endomorphisms 'a -> 'a forms a monoid with the binary, associative operator ">>" (or "<<") and the neutral element "id".]

    87 people like this

    Posted: 15 years ago by Novox

  • 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

  • A beautiful fixed-point finding function

    We start with an initial value and then applying f repeatedly, until the value does not change anymore.

    302 people like this

    Posted: 15 years ago by Nick Palladinos

Snippets by tags

kata (17) tryfsharp (48) string (29) regex (17) computation expression (15) web (29) design patterns (18) silverlight (22) sequences (48) pattern matching (15) staging (18) agent (20) lists (15) http (18) quotations (21) json (16) parsing (28) sequence (32) list (56) wpf (20)

View all...

Database contains 3207 snippets out of which 1719 is public.