Recent snippets

Popular snippets

  • Struct Tuple

    Two/Three/Four-element generic tuples implemented as a value types for writing more efficient F# code.

    77 people like this

    Posted: 15 years ago by fholm

  • Active pattern for let binding inside patterns

    The Let active pattern demonstrated by this snippet can be used to assign values to symbols in pattern matching. This is useful for writing complex pattern matching using match as we can handle multiple cases using a single clause.

    64 people like this

    Posted: 15 years ago by Tomas Petricek

  • 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

Snippets by tags

sequence (32) mailboxprocessor (27) json (16) pattern matching (15) html (16) kata (17) quotations (21) reflection (19) monad (24) learning f# (16) array (22) dsl (23) game (32) design patterns (18) algorithms (25) lazy (20) agent (20) tutorial (17) string (29) parsing (28)

View all...

Database contains 3212 snippets out of which 1719 is public.