Recent snippets

Popular snippets

  • Pipeline list processing

    An example showing how to process list in a pipeline. We first use List.filter to return only even numbers and then use List.map to format them as strings.

    86 people like this

    Posted: 5 years ago by Tomas Petricek

  • WPF / SilverLight Converter II

    version 1 is http://fssnip.net/62. This new version support convert from any existing function to a converter function by using composition and pipeline. The convert function is to make the function signature agree to the IValueConverter interface. You can add new functions in the FunctionLibrary module and reuse the class definition to reduce the coding effort. The first sample is to show how to make the converter pipeline work, the second one is a debugger converter used to debug the data binding problem.

    83 people like this

    Posted: 4 years ago by Tao Liu

  • 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.

    67 people like this

    Posted: 5 years ago by Rick Minerich

Snippets by tags

parsing (17) Game (16) Ninety-Nine F# Problems (11) reflection (14) computation builder (13) list (32) recursion (19) fold (17) html (10) seq (32) Silverlight (18) Seq (15) agent (18) string (14) Async (16) Algorithms (18) sequence (19) web (18) pattern matching (11) monad (14)

View all...

Database contains 1933 snippets out of which 1385 is public.