Recent snippets

Popular snippets

  • Filtering lists

    Two functions showing how to filter functional lists using the specified predicate. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter.

    77 people like this

    Posted: 14 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.

    70 people like this

    Posted: 14 years ago by Rick Minerich

  • NUnit Sugar

    Some simple functions for writing more idiomatic F# tests with NUnit.

    91 people like this

    Posted: 14 years ago by Ryan Riley

Snippets by tags

quotations (21) dsl (23) agent (20) lazy (20) game (32) lists (15) async (98) mailboxprocessor (27) silverlight (22) seq (54) computation expression (15) collections (16) http (18) web (29) json (16) array (22) math (35) design patterns (18) string (29) algorithms (26)

View all...

Database contains 3206 snippets out of which 1719 is public.