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: 16 years ago by Tomas Petricek

  • Partition a sequence until a predicate is satiated

    This function is given a partition predicate and a sequence. Until the predicate returns false, a list will be filled with elements. When it is, both the list and the remainder of the sequence will be returned. Note that this example preserves the laziness of the unchecked sequence elements.

    74 people like this

    Posted: 15 years ago by Rick Minerich

  • Units of Measure

    Show's how to define units of measure to add stronger typing to your numerical functions.

    75 people like this

    Posted: 16 years ago by Robert Pickering

Snippets by tags

lists (15) generic programming (17) design patterns (18) recursion (33) string (29) algorithms (25) array (22) wpf (20) list (56) learning f# (16) staging (18) computation builder (17) math (35) quotations (21) http (18) web (29) lazy (20) json (16) tryfsharp (48) html (16)

View all...

Database contains 3212 snippets out of which 1719 is public.