Recent snippets

Popular snippets

  • 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

  • Factory Pattern

    Factory pattern in F#

    82 people like this

    Posted: 14 years ago by Tao Liu

  • 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

reflection (19) regex (17) tutorial (17) sequences (48) seq (54) monad (24) staging (18) parsing (28) mailboxprocessor (27) collections (16) algorithms (25) dsl (23) list (56) kata (17) f# (43) recursion (33) design patterns (18) quotations (21) sequence (32) http (18)

View all...

Database contains 3208 snippets out of which 1719 is public.