Recent snippets

  • Get running Visual Studio instances as DTE objects

    Get running Visual Studio instances as DTE objects. Based on https://stackoverflow.com/a/14205934

    0 people like this

    Posted: 9 days ago by Gauthier Segay

  • Update Monad in F# based on Tomas Petricek article

    This is 100% based on tomas petricek blog article. there has been some small additions in regards to adding Result type and handling Monoids for the Writer Part. go check the following blog article : http://tomasp.net/blog/2014/update-monads/ Comment appreciated + bear in mind that performance wise, the Monoid Combine operator, could be greatly improved and more.

    2 people like this

    Posted: 14 days ago by Fahd Abdeljallal

  • Optimal Cloud Coloring & famous 4 color map

    Four colors will print a map so adjacent states have different color. F# has clear concise code. Map has a list of pairs sharing a border. Incremental improvements in the code can be less use of key word 'function'. Since syntax is not ambiguous can it be fixed in the compiler? so '=function |' changes to '=|' ? Welcome to improve. Harrop,Mathias,Jack,Art,HR,fwaris,Don Syme, sffs... Thanks! Musa.Jahanghir@Live.com AVCLive1.com

    2 people like this

    Posted: 15 days ago by Musa Jahanghir

  • empty list constructor

    Shows empty list constructor

    0 people like this

    Posted: 1 month ago by fsoikin

  • MailboxProcessor multi reader

    MailboxProcessor multi reader example

    2 people like this

    Posted: 2 months 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: 2 months ago by Erling Hellenäs

Popular snippets

  • Haskell function : iterate

    Implements iterate function from Haskell's Prelude. The function generates an infinite sequence by applying a function to the initial value (first) and then to the result of previous application.

    203 people like this

    Posted: 7 years ago by Nick Palladinos

  • Dynamic operator using Reflection

    Demonstrates how to implement the dynamic operator (?) using .NET Reflection. The implementation supports calling constructors, propreties and methods using simple overload resolution (based on parameter count). It handles instance as well as static members.

    62 people like this

    Posted: 7 years ago by Tomas Petricek

  • Monadic Memoization

    Modular memoization within a pure functional setting that is implemented as a convenient computation builder.

    88 people like this

    Posted: 6 years ago by Nick Palladinos

Snippets by tags

recursion (26) http (15) web (23) monad (20) seq (50) json (12) math (32) lists (13) staging (18) tryfsharp (48) html (14) pattern matching (12) regex (12) wpf (18) computation builder (14) sequences (47) fparsec (14) array (18) list (49) string (18)

View all...

Database contains 2185 snippets out of which 1500 is public.