Recent snippets

Popular snippets

  • Split a list

    Three ways to split a list in half (but not necessarily in the middle). A forth version added that's very short and should be fast, as we only use List.fold. New champ found.

    84 people like this

    Posted: 14 years ago by Dmitri Pavlenkov

  • 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

  • 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

staging (18) computation builder (17) game (32) web (29) wpf (20) fold (22) string (29) learning f# (16) sequences (48) kata (17) list (56) tutorial (17) recursion (33) pattern matching (15) algorithms (25) reflection (19) collections (16) html (16) silverlight (22) regex (17)

View all...

Database contains 3208 snippets out of which 1719 is public.