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.

    75 people like this

    Posted: 15 years ago by Tomas Petricek

  • Largest Palindrome Number from Product of Two Three Digit Numbers

    Here is an improved version twice shorter, than original

    72 people like this

    Posted: 15 years ago by Nick Canzoneri

  • 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

string (29) web (29) dsl (23) parsing (28) f# (43) tutorial (17) computation builder (17) regex (17) staging (18) fold (22) wpf (20) design patterns (18) game (32) tryfsharp (48) seq (54) sequence (32) quotations (21) list (56) array (22) algorithms (25)

View all...

Database contains 3208 snippets out of which 1719 is public.