Recent snippets

  • empty list constructor

    Shows empty list constructor

    0 people like this

    Posted: 3 days ago by fsoikin

  • MailboxProcessor multi reader

    MailboxProcessor multi reader example

    2 people like this

    Posted: 28 days ago by Zack

  • Walkthrough: Creating an Asynchronous HTTP Handler

    The Microsoft tutorial Walkthrough: Creating an Asynchronous HTTP Handler did not describe how to use IHttpAsyncHandler from F#.
    It was also a bit complicated, because it did not show how to do it from Visual Studio. Here is the Visual Studio F# version. 1. Create empty ASP.NET Web Application. Call it FSharpHttpAsyncHandler. 2. Add a F# library project to the solution. Call it FSharpHttpAsyncHandler.Lib. 3. Add the following code to Library1.fs in FSharpHttpAsyncHandler.Lib 4. Add a reference to System.Web in FSharpHttpAsyncHandler.Lib 5. Add a reference to FSharpHttpAsyncHandler.Lib in FSharpHttpAsyncHandler. 6. Add the following to Web.config in FSharpHttpAsyncHandler. 7. In the Web tab of the project properties of FSharpHttpAsyncHandler, set Start url to http://localhost://whatever.SampleAsync 8. Run debug.

    4 people like this

    Posted: 1 month ago by Erling Hellenäs

Popular snippets

  • Asynchronous sequences

    An asynchronous sequence is similar to the seq type, but the elements of the sequence are generated asynchronously without blocking the caller as in Async. This snippet declares asynchronous sequence and uses it to compare two files in 1k blocks.

    106 people like this

    Posted: 7 years ago by Tomas Petricek

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

    88 people like this

    Posted: 7 years ago by Neil Carrier

Snippets by tags

collections (16) tutorial (17) string (18) html (14) monad (20) fold (19) pattern matching (12) reflection (18) parsing (22) mailboxprocessor (26) http (15) algorithms (25) array (18) dsl (22) sequences (47) computation builder (14) silverlight (21) staging (18) tryfsharp (48) lists (13)

View all...

Database contains 2179 snippets out of which 1498 is public.