Recent snippets

Popular snippets

  • 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: 14 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

  • Strategy pattern

    Strategy pattern in F#

    83 people like this

    Posted: 14 years ago by Tao Liu

Snippets by tags

http (18) json (16) array (22) design patterns (18) sequences (48) web (29) collections (16) pattern matching (15) math (35) fold (22) lazy (20) string (29) tutorial (17) game (32) learning f# (16) tryfsharp (48) dsl (23) computation builder (17) agent (20) mailboxprocessor (27)

View all...

Database contains 3206 snippets out of which 1719 is public.