Recent snippets

Popular snippets

  • The Haskell const function

    The const function is simple, but you can use it to make your code more legible. In this example we convert a unary function to a function of arity 2 (that ignores the second argument). Also by using the flip function from Haskell (which is equally easy to define) you can ignore the first argument.

    119 people like this

    Posted: 15 years ago by Alex Muscar

  • Filtering lists

    Two functions showing how to filter functional lists using the specified predicate. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter.

    77 people like this

    Posted: 15 years ago by Tomas Petricek

  • Minimal XML DSL

    This snippet provides a very small internal DSL for creating and querying XML using the underlying XLinq classes.

    374 people like this

    Posted: 15 years ago by Blake Coverett

Snippets by tags

parsing (28) lazy (20) seq (54) collections (16) json (16) agent (20) monad (24) learning f# (16) tutorial (17) string (29) silverlight (22) tryfsharp (48) array (22) f# (43) web (29) mailboxprocessor (27) lists (15) recursion (33) async (98) dsl (23)

View all...

Database contains 3208 snippets out of which 1719 is public.