Recent snippets

Popular snippets

  • 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

  • Top-Down-Operator-Precedence Parser

    F# implementation of a generic Top-Down-Operator-Precedence Parser as described in this paper http://portal.acm.org/citation.cfm?id=512931 Example starts at line ~300

    90 people like this

    Posted: 14 years ago by fholm

  • FSX Structure

    I use this basic template when writing .fsx files that I might want to compile. It adjusts the difference in command line/entrypoint handling between a script and a compiled assembly. This example shows the details for a WPF script — replace the #r's and/or remove the STAThread for a WinForms or Console script.

    127 people like this

    Posted: 15 years ago by Blake Coverett

Snippets by tags

html (16) lazy (20) parsing (28) game (32) reflection (19) generic programming (17) quotations (21) mailboxprocessor (27) wpf (20) web (29) fold (22) design patterns (18) f# (43) tryfsharp (48) algorithms (25) monad (24) recursion (33) agent (20) seq (54) silverlight (22)

View all...

Database contains 3208 snippets out of which 1719 is public.