Recent snippets

Popular snippets

  • Projecting lists

    Three functions showing how to implement projection for functional lists. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter. The third version extends this with continuation passing.

    74 people like this

    Posted: 15 years ago by Tomas Petricek

  • Strategy pattern

    Strategy pattern in F#

    83 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: 15 years ago by Novox

Snippets by tags

computation expression (15) silverlight (22) mailboxprocessor (27) sequence (32) async (98) generic programming (17) seq (54) learning f# (16) reflection (19) algorithms (26) sequences (48) kata (17) http (18) lists (15) computation builder (17) agent (20) tryfsharp (48) math (35) parsing (28) html (16)

View all...

Database contains 3207 snippets out of which 1719 is public.