Recent snippets

Popular snippets

  • Split a list

    Three ways to split a list in half (but not necessarily in the middle). A forth version added that's very short and should be fast, as we only use List.fold. New champ found.

    83 people like this

    Posted: 14 years ago by Dmitri Pavlenkov

  • 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

  • Chain of responsibility II

    Unlike the previous chain of responsibility, this version use the pipeline to chain responsibilities.

    104 people like this

    Posted: 14 years ago by Tao Liu

Snippets by tags

recursion (33) web (29) parsing (28) sequence (32) regex (17) reflection (19) generic programming (17) seq (54) monad (24) game (32) lists (15) design patterns (18) lazy (20) tutorial (17) agent (20) http (18) algorithms (26) tryfsharp (48) staging (18) collections (16)

View all...

Database contains 3206 snippets out of which 1719 is public.