Recent snippets

Popular snippets

  • Haskell function : iterate

    Implements iterate function from Haskell's Prelude. The function generates an infinite sequence by applying a function to the initial value (first) and then to the result of previous application.

    203 people like this

    Posted: 15 years ago by Nick Palladinos

  • Chain of responsibility

    The following sample wants to make sure the person’s age is between 18 and 65, weight is no more than 200 and tall enough (>120).

    85 people like this

    Posted: 15 years ago by Tao Liu

  • Partition a sequence until a predicate is satiated

    This function is given a partition predicate and a sequence. Until the predicate returns false, a list will be filled with elements. When it is, both the list and the remainder of the sequence will be returned. Note that this example preserves the laziness of the unchecked sequence elements.

    74 people like this

    Posted: 15 years ago by Rick Minerich

Snippets by tags

math (35) dsl (23) tryfsharp (48) html (16) wpf (20) lazy (20) sequences (48) seq (54) collections (16) reflection (19) computation builder (17) tutorial (17) fold (22) list (56) kata (17) f# (43) array (22) lists (15) string (29) web (29)

View all...

Database contains 3209 snippets out of which 1719 is public.