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

  • Monadic Memoization

    Modular memoization within a pure functional setting that is implemented as a convenient computation builder.

    92 people like this

    Posted: 15 years ago by Nick Palladinos

  • Top-Down-Operator-Precedence Parser

    F# implementation of a generic Top-Down-Operator-Precedence Parser as described in this paper http://portal.acm.org/citation.cfm?id=512931 Example starts at line ~300

    90 people like this

    Posted: 15 years ago by fholm

Snippets by tags

dsl (23) seq (54) json (16) array (22) agent (20) http (18) fold (22) computation expression (15) kata (17) staging (18) regex (17) f# (43) recursion (33) algorithms (25) quotations (21) string (29) html (16) web (29) math (35) reflection (19)

View all...

Database contains 3208 snippets out of which 1719 is public.