Recent snippets

Popular snippets

  • Command pattern for Redo-Undo II

    This command redo-undo implement group the command under Do/Undo category.

    71 people like this

    Posted: 15 years ago by Tao Liu

  • 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

  • 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

lazy (20) agent (20) regex (17) tutorial (17) silverlight (22) string (29) sequence (32) generic programming (17) staging (18) http (18) design patterns (18) monad (24) game (32) list (56) collections (16) parsing (28) html (16) kata (17) mailboxprocessor (27) recursion (33)

View all...

Database contains 3212 snippets out of which 1719 is public.