Recent snippets

  • Norvig's Spelling Corrector

    A line-by-line translation of Norvig's original Python code. An attempt to view F# as a "typed" Python.

    0 people like this

    Posted: 10 days ago by Nick Palladinos

  • PDF Text Extract

    Extracts text content from PDF file using PDFsharp.

    2 people like this

    Posted: 27 days ago by Phillip Trelford

  • Every spot in the puzzle belongs to a (horizontal) row and a (vertical) column, as well as to one single 3x3 square (which we call "square" for short). At the beginning, some of the spots carry a single-digit number between 1 and 9. The problem is to fill the missing spots with digits in such a way that every number between 1 and 9 appears exactly once in each row, in each column, and in each square.

    1 people like this

    Posted: 27 days ago by Tomas Petricek

Popular snippets

  • Dynamic operator using Reflection

    Demonstrates how to implement the dynamic operator (?) using .NET Reflection. The implementation supports calling constructors, propreties and methods using simple overload resolution (based on parameter count). It handles instance as well as static members.

    67 people like this

    Posted: 10 years ago by Tomas Petricek

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

    68 people like this

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

    68 people like this

    Posted: 10 years ago by Rick Minerich

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

    87 people like this

    Posted: 9 years ago by Tao Liu

  • get the list of LAN Sql servers

    get the list of ethernet sql servers

    90 people like this

    Posted: 10 years ago by nCdy

  • Struct Tuple

    Two/Three/Four-element generic tuples implemented as a value types for writing more efficient F# code.

    59 people like this

    Posted: 10 years ago by fholm

Snippets by tags

seq (54) list (55) silverlight (22) staging (18) learning f# (16) fparsec (15) agent (20) mailboxprocessor (27) tutorial (17) string (25) reflection (19) sequences (47) recursion (32) f# (44) pattern matching (14) http (17) algorithms (25) sequence (32) lists (14) array (22)

View all...

Database contains 2761 snippets out of which 1663 is public.