Recent snippets

Popular snippets

  • Hello world (F#)

    Classical "Hello world" example that prints a message to the console output. This version uses F# printfn function to do the printing.

    185 people like this

    Posted: 15 years ago by Tomas Petricek

  • Continuation-Passing Mnemonics

    Continuations provide a means whereby heap space can be traded for stack depth (heap space being generally more plentiful than stack depth). They are especially useful where tail recursion is not possible. Here are a couple of simple continuation examples that can be extended to cover more complex scenarios.

    100 people like this

    Posted: 15 years ago by Neil Carrier

  • 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

Snippets by tags

generic programming (17) monad (24) array (22) web (29) html (16) json (16) agent (20) mailboxprocessor (27) fold (22) lazy (20) kata (17) sequence (32) wpf (20) quotations (21) http (18) design patterns (18) math (35) collections (16) recursion (33) seq (54)

View all...

Database contains 3207 snippets out of which 1719 is public.