Recent snippets

Popular snippets

  • Chain of responsibility II

    Unlike the previous chain of responsibility, this version use the pipeline to chain responsibilities.

    99 people like this

    Posted: 9 years ago by Tao Liu

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

    80 people like this

    Posted: 10 years ago by Novox

  • Load XAML

    This example shows how to load a Xaml file allowing to use WPF from F#. It also shows how to access WPF objects and register event handlers.

    105 people like this

    Posted: 10 years ago by Antonio Cisternino

  • Top-Down-Operator-Precedence Parser

    F# implementation of a generic Top-Down-Operator-Precedence Parser as described in this paper http://portal.acm.org/citation.cfm?id=512931 Example starts at line ~300

    87 people like this

    Posted: 10 years ago by fholm

  • Minimal XML DSL

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

    364 people like this

    Posted: 10 years ago by Blake Coverett

  • 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: 10 years ago by Neil Carrier

Snippets by tags

dsl (23) f# (44) math (35) collections (16) silverlight (22) learning f# (16) array (22) pattern matching (14) design patterns (18) algorithms (25) reflection (19) sequences (47) string (25) staging (18) mailboxprocessor (27) seq (54) kata (17) html (15) sequence (32) quotations (20)

View all...

Database contains 2672 snippets out of which 1658 is public.