Recent snippets

Popular snippets

  • Command pattern for Redo-Undo II

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

    60 people like this

    Posted: 5 years ago by Tao Liu

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

    88 people like this

    Posted: 6 years ago by Neil Carrier

  • Implementing active objects with a MailboxProcessor

    Mailbox processors can easily be used to implement active objects. This example shows how to do that with a reusable wrapper type and minimal boilerplate code in the actual class definitions. Supports both asynchronous calls and synchronous calls. For the latter case, exceptions are automatically propagated back to the caller.

    90 people like this

    Posted: 6 years ago by Wolfgang Meyer

  • Adapter pattern

    Invoke the methods from incompatible types

    97 people like this

    Posted: 5 years ago by Tao Liu

  • Implementing active objects with a MailboxProcessor

    Mailbox processors can easily be used to implement active objects. This example shows how to do that with a reusable wrapper type and minimal boilerplate code in the actual class definitions. Supports both asynchronous calls and synchronous calls. For the latter case, exceptions are automatically propagated back to the caller.

    90 people like this

    Posted: 6 years ago by Wolfgang Meyer

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

    63 people like this

    Posted: 6 years ago by Tomas Petricek

Snippets by tags

json (12) parsing (22) web (23) monad (20) dsl (22) html (14) f# (42) collections (16) recursion (26) tryfsharp (48) kata (17) agent (20) staging (13) list (49) sequences (47) computation builder (13) learning f# (16) sequence (29) reflection (18) wpf (17)

View all...

Database contains 2108 snippets out of which 1456 is public.