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

  • 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

mailboxprocessor (27) wpf (20) tryfsharp (48) computation builder (17) parsing (28) dsl (23) design patterns (18) staging (18) lists (15) array (22) math (35) http (18) lazy (20) learning f# (16) tutorial (17) list (56) silverlight (22) web (29) computation expression (15) sequences (48)

View all...

Database contains 3208 snippets out of which 1719 is public.