Recent snippets

Popular snippets

  • Command pattern for Redo-Undo II

    This command redo-undo implement group the command under Do/Undo category.

    70 people like this

    Posted: 14 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".]

    87 people like this

    Posted: 14 years ago by Novox

  • WPF / SilverLight Converter II

    version 1 is http://fssnip.net/62. This new version support convert from any existing function to a converter function by using composition and pipeline. The convert function is to make the function signature agree to the IValueConverter interface. You can add new functions in the FunctionLibrary module and reuse the class definition to reduce the coding effort. The first sample is to show how to make the converter pipeline work, the second one is a debugger converter used to debug the data binding problem.

    90 people like this

    Posted: 14 years ago by Tao Liu

Snippets by tags

lazy (20) parsing (28) sequences (48) quotations (21) monad (24) computation expression (15) design patterns (18) recursion (33) tutorial (17) collections (16) json (16) dsl (23) reflection (19) sequence (32) string (29) web (29) html (16) game (32) kata (17) generic programming (17)

View all...

Database contains 3206 snippets out of which 1719 is public.