Recent snippets

Popular snippets

  • Filtering lists

    Two functions showing how to filter functional lists using the specified predicate. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter.

    77 people like this

    Posted: 15 years ago by Tomas Petricek

  • 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

  • Strategy pattern

    Strategy pattern in F#

    83 people like this

    Posted: 14 years ago by Tao Liu

Snippets by tags

tutorial (17) mailboxprocessor (27) list (56) array (22) agent (20) algorithms (26) f# (43) recursion (33) silverlight (22) pattern matching (15) generic programming (17) parsing (28) computation expression (15) http (18) staging (18) wpf (20) kata (17) web (29) json (16) async (98)

View all...

Database contains 3208 snippets out of which 1719 is public.