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.

    74 people like this

    Posted: 15 years ago by Tomas Petricek

  • Command pattern for Redo-Undo II

    This command redo-undo implement group the command under Do/Undo category.

    70 people like this

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

    70 people like this

    Posted: 15 years ago by Rick Minerich

Snippets by tags

monad (24) computation builder (17) http (18) array (22) game (32) collections (16) lazy (20) recursion (33) tryfsharp (48) f# (43) math (35) silverlight (22) seq (54) reflection (19) mailboxprocessor (27) html (16) async (98) string (29) list (56) wpf (20)

View all...

Database contains 3208 snippets out of which 1719 is public.